3 PostgreSQL documentation
6 <refentry id=
"APP-CREATELANG">
8 <refentrytitle id=
"APP-CREATELANG-TITLE"><application>createlang
</application></refentrytitle>
9 <manvolnum>1</manvolnum>
10 <refmiscinfo>Application
</refmiscinfo>
14 <refname>createlang
</refname>
15 <refpurpose>define a new
<productname>PostgreSQL
</productname> procedural language
</refpurpose>
18 <indexterm zone=
"app-createlang">
19 <primary>createlang
</primary>
24 <command>createlang
</command>
25 <arg rep=
"repeat"><replaceable>connection-option
</replaceable></arg>
26 <arg choice=
"plain"><replaceable>langname
</replaceable></arg>
27 <arg><replaceable>dbname
</replaceable></arg>
29 <command>createlang
</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>
38 <title>Description
</title>
41 <application>createlang
</application> is a utility for adding a new
42 programming language to a
<productname>PostgreSQL
</productname> database.
43 <application>createlang
</application> is just a wrapper around the
44 <xref linkend=
"sql-createlanguage" endterm=
"sql-createlanguage-title">
51 <title>Options
</title>
54 <application>createlang
</application> accepts the following command-line arguments:
58 <term><replaceable class=
"parameter">langname
</replaceable></term>
61 Specifies the name of the procedural programming language to be
68 <term><option><optional>-d<
/> <replaceable class=
"parameter">dbname
</replaceable><
/></term>
69 <term><option><optional>--dbname<
/> <replaceable class=
"parameter">dbname
</replaceable><
/></term>
72 Specifies to which database the language should be added.
73 The default is to use the database with the same name as the
80 <term><option>-e<
/></term>
81 <term><option>--echo<
/></term>
84 Display SQL commands as they are executed.
90 <term><option>-l<
/></term>
91 <term><option>--list<
/></term>
94 Show a list of already installed languages in the target database.
103 <application>createlang
</application> also accepts
104 the following command-line arguments for connection parameters:
108 <term><option>-h
<replaceable class=
"parameter">host
</replaceable><
/></term>
109 <term><option>--host
<replaceable class=
"parameter">host
</replaceable><
/></term>
112 Specifies the host name of the machine on which the
114 is running. If the value begins with a slash, it is used
115 as the directory for the Unix domain socket.
121 <term><option>-p
<replaceable class=
"parameter">port
</replaceable><
/></term>
122 <term><option>--port
<replaceable class=
"parameter">port
</replaceable><
/></term>
125 Specifies the TCP port or local Unix domain socket file
126 extension on which the server
127 is listening for connections.
133 <term><option>-U
<replaceable class=
"parameter">username
</replaceable><
/></term>
134 <term><option>--username
<replaceable class=
"parameter">username
</replaceable><
/></term>
137 User name to connect as.
143 <term><option>-w<
/></term>
144 <term><option>--no-password<
/></term>
147 Never issue a password prompt. If the server requires
148 password authentication and a password is not available by
149 other means such as a
<filename>.pgpass
</filename> file, the
150 connection attempt will fail. This option can be useful in
151 batch jobs and scripts where no user is present to enter a
158 <term><option>-W<
/></term>
159 <term><option>--password<
/></term>
162 Force
<application>createlang
</application> to prompt for a
163 password before connecting to a database.
167 This option is never essential, since
168 <application>createlang
</application> will automatically prompt
169 for a password if the server demands password authentication.
170 However,
<application>createlang
</application> will waste a
171 connection attempt finding out that the server wants a password.
172 In some cases it is worth typing
<option>-W<
/> to avoid the extra
184 <title>Environment
</title>
188 <term><envar>PGDATABASE
</envar></term>
189 <term><envar>PGHOST
</envar></term>
190 <term><envar>PGPORT
</envar></term>
191 <term><envar>PGUSER
</envar></term>
195 Default connection parameters
202 This utility, like most other
<productname>PostgreSQL<
/> utilities,
203 also uses the environment variables supported by
<application>libpq<
/>
204 (see
<xref linkend=
"libpq-envars">).
211 <title>Diagnostics
</title>
214 Most error messages are self-explanatory. If not, run
215 <application>createlang
</application> with the
<option>--echo
</option>
216 option and see under the respective
<acronym>SQL
</acronym> command
217 for details. Also, any default connection settings and environment
218 variables used by the
<application>libpq
</application> front-end
228 Use
<xref linkend=
"app-droplang"> to remove a language.
234 <title>Examples
</title>
237 To install the language
<literal>pltcl
</literal> into the database
238 <literal>template1
</literal>:
240 <prompt>$
</prompt><userinput>createlang pltcl template1
</userinput>
242 Note that installing the language into
<literal>template1
</literal>
243 will cause it to be automatically installed into subsequently-created
249 <title>See Also
</title>
251 <simplelist type=
"inline">
252 <member><xref linkend=
"app-droplang"></member>
253 <member><xref linkend=
"sql-createlanguage" endterm=
"sql-createlanguage-title"></member>