Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / doc / src / sgml / ref / droplang.sgml
blobd22dbc509eef99fd57d480cd2721b8e5f4a0d50c
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="APP-DROPLANG">
7 <refmeta>
8 <refentrytitle id="APP-DROPLANG-TITLE"><application>droplang</application></refentrytitle>
9 <manvolnum>1</manvolnum>
10 <refmiscinfo>Application</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>droplang</refname>
15 <refpurpose>remove a <productname>PostgreSQL</productname> procedural language</refpurpose>
16 </refnamediv>
18 <indexterm zone="app-droplang">
19 <primary>droplang</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <cmdsynopsis>
24 <command>droplang</command>
25 <arg rep="repeat"><replaceable>connection-option</replaceable></arg>
26 <arg choice="plain"><replaceable>langname</replaceable></arg>
27 <arg><replaceable>dbname</replaceable></arg>
28 <sbr>
29 <command>droplang</command>
30 <arg rep="repeat"><replaceable>connection-option</replaceable></arg>
31 <group choice="plain"><arg>--list</arg><arg>-l</arg></group>
32 <arg choice="plain"><replaceable>dbname</replaceable></arg>
33 </cmdsynopsis>
34 </refsynopsisdiv>
36 <refsect1 id="R1-APP-DROPLANG-1">
37 <title>
38 Description
39 </title>
41 <para>
42 <application>droplang</application> is a utility for removing an
43 existing programming language from a
44 <productname>PostgreSQL</productname> database.
45 <application>droplang</application> can drop any procedural language,
46 even those not supplied by the <productname>PostgreSQL</> distribution.
47 </para>
48 <para>
49 Although backend programming languages can be removed directly using
50 several <acronym>SQL</acronym> commands, it is recommended to use
51 <application>droplang</application> because it performs a number
52 of checks and is much easier to use. See
53 <xref linkend="sql-droplanguage" endterm="sql-droplanguage-title">
54 for more.
55 </para>
56 </refsect1>
59 <refsect1>
60 <title>Options</title>
62 <para>
63 <application>droplang</application> accepts the following command line arguments:
65 <variablelist>
66 <varlistentry>
67 <term><replaceable class="parameter">langname</replaceable></term>
68 <listitem>
69 <para>
70 Specifies the name of the backend programming language to be removed.
71 </para>
72 </listitem>
73 </varlistentry>
75 <varlistentry>
76 <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term>
77 <term><option><optional>--dbname</> <replaceable class="parameter">dbname</replaceable></></term>
78 <listitem>
79 <para>
80 Specifies from which database the language should be removed.
81 The default is to use the database with the same name as the
82 current system user.
83 </para>
84 </listitem>
85 </varlistentry>
87 <varlistentry>
88 <term><option>-e</></term>
89 <term><option>--echo</></term>
90 <listitem>
91 <para>
92 Display SQL commands as they are executed.
93 </para>
94 </listitem>
95 </varlistentry>
97 <varlistentry>
98 <term><option>-l</></term>
99 <term><option>--list</></term>
100 <listitem>
101 <para>
102 Show a list of already installed languages in the target database.
103 </para>
104 </listitem>
105 </varlistentry>
107 </variablelist>
108 </para>
110 <para>
111 <application>droplang</application> also accepts
112 the following command line arguments for connection parameters:
114 <variablelist>
115 <varlistentry>
116 <term><option>-h <replaceable class="parameter">host</replaceable></></term>
117 <term><option>--host <replaceable class="parameter">host</replaceable></></term>
118 <listitem>
119 <para>
120 Specifies the host name of the machine on which the
121 server
122 is running. If host begins with a slash, it is used
123 as the directory for the Unix domain socket.
124 </para>
125 </listitem>
126 </varlistentry>
128 <varlistentry>
129 <term><option>-p <replaceable class="parameter">port</replaceable></></term>
130 <term><option>--port <replaceable class="parameter">port</replaceable></></term>
131 <listitem>
132 <para>
133 Specifies the Internet TCP/IP port or local Unix domain socket file
134 extension on which the server
135 is listening for connections.
136 </para>
137 </listitem>
138 </varlistentry>
140 <varlistentry>
141 <term><option>-U <replaceable class="parameter">username</replaceable></></term>
142 <term><option>--username <replaceable class="parameter">username</replaceable></></term>
143 <listitem>
144 <para>
145 User name to connect as.
146 </para>
147 </listitem>
148 </varlistentry>
150 <varlistentry>
151 <term><option>-W</></term>
152 <term><option>--password</></term>
153 <listitem>
154 <para>
155 Force <application>droplang</application> to prompt for a
156 password before connecting to a database.
157 </para>
159 <para>
160 This option is never essential, since
161 <application>droplang</application> will automatically prompt
162 for a password if the server demands password authentication.
163 However, <application>droplang</application> will waste a
164 connection attempt finding out that the server wants a password.
165 In some cases it is worth typing <option>-W</> to avoid the extra
166 connection attempt.
167 </para>
168 </listitem>
169 </varlistentry>
171 </variablelist>
172 </para>
173 </refsect1>
176 <refsect1>
177 <title>Environment</title>
179 <variablelist>
180 <varlistentry>
181 <term><envar>PGDATABASE</envar></term>
182 <term><envar>PGHOST</envar></term>
183 <term><envar>PGPORT</envar></term>
184 <term><envar>PGUSER</envar></term>
186 <listitem>
187 <para>
188 Default connection parameters
189 </para>
190 </listitem>
191 </varlistentry>
192 </variablelist>
194 <para>
195 This utility, like most other <productname>PostgreSQL</> utilities,
196 also uses the environment variables supported by <application>libpq</>
197 (see <xref linkend="libpq-envars">).
198 </para>
200 </refsect1>
203 <refsect1>
204 <title>Diagnostics</title>
206 <para>
207 Most error messages are self-explanatory. If not, run
208 <application>droplang</application> with the <option>--echo</option>
209 option and see under the respective <acronym>SQL</acronym> command
210 for details. Also, any default connection settings and environment
211 variables used by the <application>libpq</application> front-end
212 library will apply.
213 </para>
214 </refsect1>
217 <refsect1>
218 <title>Notes</title>
220 <para>
221 Use <xref linkend="app-createlang"> to add a language.
222 </para>
223 </refsect1>
226 <refsect1>
227 <title>Examples</title>
229 <para>
230 To remove the language <literal>pltcl</literal>:
231 <screen>
232 <prompt>$ </prompt><userinput>droplang pltcl dbname</userinput>
233 </screen>
234 </para>
235 </refsect1>
237 <refsect1>
238 <title>See Also</title>
240 <simplelist type="inline">
241 <member><xref linkend="app-createlang"></member>
242 <member><xref linkend="sql-droplanguage" endterm="sql-droplanguage-title"></member>
243 </simplelist>
244 </refsect1>
246 </refentry>