Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / doc / src / sgml / ref / droplang.sgml
blob29bff147cb5587f90a8a203b61bc624036a6f6bb
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>--no-password</></term>
153 <listitem>
154 <para>
155 Never issue a password prompt. If the server requires
156 password authentication and a password is not available by
157 other means such as a <filename>.pgpass</filename> file, the
158 connection attempt will fail. This option can be useful in
159 batch jobs and scripts where no user is present to enter a
160 password.
161 </para>
162 </listitem>
163 </varlistentry>
165 <varlistentry>
166 <term><option>-W</></term>
167 <term><option>--password</></term>
168 <listitem>
169 <para>
170 Force <application>droplang</application> to prompt for a
171 password before connecting to a database.
172 </para>
174 <para>
175 This option is never essential, since
176 <application>droplang</application> will automatically prompt
177 for a password if the server demands password authentication.
178 However, <application>droplang</application> will waste a
179 connection attempt finding out that the server wants a password.
180 In some cases it is worth typing <option>-W</> to avoid the extra
181 connection attempt.
182 </para>
183 </listitem>
184 </varlistentry>
186 </variablelist>
187 </para>
188 </refsect1>
191 <refsect1>
192 <title>Environment</title>
194 <variablelist>
195 <varlistentry>
196 <term><envar>PGDATABASE</envar></term>
197 <term><envar>PGHOST</envar></term>
198 <term><envar>PGPORT</envar></term>
199 <term><envar>PGUSER</envar></term>
201 <listitem>
202 <para>
203 Default connection parameters
204 </para>
205 </listitem>
206 </varlistentry>
207 </variablelist>
209 <para>
210 This utility, like most other <productname>PostgreSQL</> utilities,
211 also uses the environment variables supported by <application>libpq</>
212 (see <xref linkend="libpq-envars">).
213 </para>
215 </refsect1>
218 <refsect1>
219 <title>Diagnostics</title>
221 <para>
222 Most error messages are self-explanatory. If not, run
223 <application>droplang</application> with the <option>--echo</option>
224 option and see under the respective <acronym>SQL</acronym> command
225 for details. Also, any default connection settings and environment
226 variables used by the <application>libpq</application> front-end
227 library will apply.
228 </para>
229 </refsect1>
232 <refsect1>
233 <title>Notes</title>
235 <para>
236 Use <xref linkend="app-createlang"> to add a language.
237 </para>
238 </refsect1>
241 <refsect1>
242 <title>Examples</title>
244 <para>
245 To remove the language <literal>pltcl</literal>:
246 <screen>
247 <prompt>$ </prompt><userinput>droplang pltcl dbname</userinput>
248 </screen>
249 </para>
250 </refsect1>
252 <refsect1>
253 <title>See Also</title>
255 <simplelist type="inline">
256 <member><xref linkend="app-createlang"></member>
257 <member><xref linkend="sql-droplanguage" endterm="sql-droplanguage-title"></member>
258 </simplelist>
259 </refsect1>
261 </refentry>