2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.18 2001/10/22 23:48:11 tgl Exp $
6 <refentry id="APP-CREATELANG">
8 <date>2001-05-09</date>
12 <refentrytitle id="APP-CREATELANG-TITLE"><application>createlang</application></refentrytitle>
13 <manvolnum>1</manvolnum>
14 <refmiscinfo>Application</refmiscinfo>
18 <refname id="createlang">createlang</refname>
19 <refpurpose>define a new <productname>PostgreSQL</productname> procedural language</refpurpose>
24 <command>createlang</command>
25 <arg rep="repeat"><replaceable>connection-options</replaceable></arg>
26 <arg><replaceable>langname</replaceable></arg>
27 <arg choice="plain"><replaceable>dbname</replaceable></arg>
29 <command>createlang</command>
30 <arg rep="repeat"><replaceable>connection-options</replaceable></arg>
31 <group choice="plain"><arg>--list</arg><arg>-l</arg></group>
32 <arg choice="plain"><replaceable>dbname</replaceable></arg>
35 <refsect2 id="R2-APP-CREATELANG-1">
40 <application>createlang</application> accepts the following command line arguments:
44 <term><replaceable class="parameter">langname</replaceable></term>
47 Specifies the name of the backend programming language to be defined.
48 <application>createlang</application> will prompt for
49 <replaceable class="parameter">langname</replaceable>
50 if it is not specified on the command line.
56 <term>-d, --dbname <replaceable class="parameter">dbname</replaceable></term>
59 Specifies which database the language should be added.
65 <term>-e, --echo</term>
68 Displays SQL commands as they are executed.
74 <term>-l, --list</term>
77 Shows a list of already installed languages in the target database
78 (which must be specified).
84 <term>--L <replaceable class="parameter">directory</replaceable></term>
87 Specifies the directory in which the language interpreter is
88 to be found. This is normally found automatically.
97 <application>createlang</application> also accepts
98 the following command line arguments for connection parameters:
102 <term>-h, --host <replaceable class="parameter">host</replaceable></term>
105 Specifies the hostname of the machine on which the
106 <application>postmaster</application>
107 is running. If host begins with a slash, it is used
108 as the directory for the unix domain socket.
114 <term>-p, --port <replaceable class="parameter">port</replaceable></term>
117 Specifies the Internet TCP/IP port or local Unix domain socket file
118 extension on which the <application>postmaster</application>
119 is listening for connections.
125 <term>-U, --username <replaceable class="parameter">username</replaceable></term>
128 Username to connect as.
134 <term>-W, --password</term>
137 Force password prompt.
146 <refsect2 id="R2-APP-CREATELANG-2">
151 Most error messages are self-explanatory. If not, run
152 <application>createlang</application> with the <option>--echo</option>
153 option and see under the respective <acronym>SQL</acronym> command
154 for details. Check also under <xref linkend="APP-PSQL">
155 for more possibilities.
160 <refsect1 id="R1-APP-CREATELANG-1">
166 <application>createlang</application> is a utility for adding a new
167 programming language to a <productname>Postgres</productname> database.
168 <application>createlang</application> currently accepts several
169 languages, <literal>plpgsql, pltcl, pltclu,</literal> and <literal>
173 Although backend programming languages can be added directly using
174 several <acronym>SQL</acronym> commands, it is recommended to use
175 <application>createlang</application> because it performs a number
176 of checks and is much easier to use. See
177 <xref linkend="sql-createlanguage" endterm="sql-createlanguage-title">
182 <refsect1 id="R1-APP-CREATELANG-2">
187 Use <xref linkend="app-droplang"> to remove a language.
191 <application>createlang</application> is a shell script that invokes
192 <application>psql</application> several times. If you have things
193 arranged so that a password prompt is required to connect, you will be
194 prompted for a password several times.
198 <refsect1 id="R1-APP-CREATELANG-3">
203 To install <literal>pltcl</literal> into the database
204 <literal>template1</literal>:
206 <prompt>$ </prompt><userinput>createlang pltcl template1</userinput>
213 <!-- Keep this comment at the end of the file
218 sgml-minimize-attributes:nil
219 sgml-always-quote-attributes:t
222 sgml-parent-document:nil
223 sgml-default-dtd-file:"../reference.ced"
224 sgml-exposed-tags:nil
225 sgml-local-catalogs:"/usr/lib/sgml/catalog"
226 sgml-local-ecat-files:nil