File: app-createlang.html

package info (click to toggle)
pgadmin3 1.4.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 29,796 kB
  • ctags: 10,758
  • sloc: cpp: 55,356; sh: 6,164; ansic: 1,520; makefile: 576; sql: 482; xml: 100; perl: 18
file content (137 lines) | stat: -rw-r--r-- 8,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>createlang</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="reference-client.html" title="PostgreSQL Client Applications">
<link rel="prev" href="app-createdb.html" title="createdb">
<link rel="next" href="app-createuser.html" title="createuser">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
<a name="app-createlang"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>createlang &#8212; define a new <span class="productname">PostgreSQL</span> procedural language</p>
</div>
<a name="id792502"></a><div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">createlang</code> [<em class="replaceable"><code>connection-option</code></em>...]  <em class="replaceable"><code>langname</code></em>  [<em class="replaceable"><code>dbname</code></em>]<br><code class="command">createlang</code> [<em class="replaceable"><code>connection-option</code></em>...]  [--list] |  [-l]   <em class="replaceable"><code>dbname</code></em> </p></div>
</div>
<div class="refsect1" lang="en">
<a name="id792592"></a><h2>Description</h2>
<p>   <span class="application">createlang</span> is a utility for adding a new 
   programming language to a <span class="productname">PostgreSQL</span> database.
   <span class="application">createlang</span> is just a wrapper around the
   <a href="sql-createlanguage.html">CREATE LANGUAGE</a>
   command, which see for additional information.
  </p>
</div>
<div class="refsect1" lang="en">
<a name="id792633"></a><h2>Options</h2>
<p>    <span class="application">createlang</span> accepts the following command-line arguments:
    
    </p>
<div class="variablelist"><dl>
<dt><span class="term"><em class="replaceable"><code>langname</code></em></span></dt>
<dd><p>        Specifies the name of the procedural programming language to be
        defined.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">[<span class="optional">-d</span>] <em class="replaceable"><code>dbname</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">[<span class="optional">--dbname</span>] <em class="replaceable"><code>dbname</code></em></code></span>
</dt>
<dd><p>        Specifies to which database the language should be added.
        The default is to use the database with the same name as the
        current system user.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-e</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--echo</code></span>
</dt>
<dd><p>        Display SQL commands as they are executed.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-l</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--list</code></span>
</dt>
<dd><p>        Show a list of already installed languages in the target database.
       </p></dd>
</dl></div>
<p>
   </p>
<p>    <span class="application">createlang</span> also accepts 
    the following command-line arguments for connection parameters:
    
    </p>
<div class="variablelist"><dl>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-h <em class="replaceable"><code>host</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--host <em class="replaceable"><code>host</code></em></code></span>
</dt>
<dd><p>        Specifies the host name of the machine on which the 
        server
        is running.  If the value begins with a slash, it is used 
        as the directory for the Unix domain socket.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-p <em class="replaceable"><code>port</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--port <em class="replaceable"><code>port</code></em></code></span>
</dt>
<dd><p>        Specifies the TCP port or local Unix domain socket file 
        extension on which the server
        is listening for connections.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-U <em class="replaceable"><code>username</code></em></code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--username <em class="replaceable"><code>username</code></em></code></span>
</dt>
<dd><p>        User name to connect as.
       </p></dd>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="option">-W</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="option">--password</code></span>
</dt>
<dd><p>        Force password prompt.
       </p></dd>
</dl></div>
<p>
   </p>
</div>
<div class="refsect1" lang="en">
<a name="id792822"></a><h2>Environment</h2>
<div class="variablelist"><dl>
<dt>
<span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGDATABASE</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGHOST</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="term"><code xmlns="" class="envar">PGPORT</code></span><br xmlns="http://www.w3.org/TR/xhtml1/transitional"></br><span class="term"><code class="envar">PGUSER</code></span>
</dt>
<dd><p>      Default connection parameters
     </p></dd>
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id792849"></a><h2>Diagnostics</h2>
<p>    Most error messages are self-explanatory. If not, run
    <span class="application">createlang</span> with the <code class="option">--echo</code>
    option and see under the respective <acronym class="acronym">SQL</acronym> command
    for details.
   </p>
</div>
<div class="refsect1" lang="en">
<a name="id792872"></a><h2>Notes</h2>
<p>   Use <a href="app-droplang.html" title="droplang"><span class="refentrytitle"><a name="app-droplang-title"></a><span class="application">droplang</span></span></a> to remove a language.
  </p>
</div>
<div class="refsect1" lang="en">
<a name="id792885"></a><h2>Examples</h2>
<p>    To install the language <code class="literal">pltcl</code> into the database
    <code class="literal">template1</code>:
</p>
<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>createlang pltcl template1</code></strong></pre>
<p>
    Note that installing the language into <code class="literal">template1</code>
    will cause it to be automatically installed into subsequently-created
    databases as well.
   </p>
</div>
<div class="refsect1" lang="en">
<a name="id792929"></a><h2>See Also</h2>
<span class="simplelist"><a href="app-droplang.html" title="droplang"><span class="refentrytitle"><a name="app-droplang-title"></a><span class="application">droplang</span></span></a>, <a href="sql-createlanguage.html">CREATE LANGUAGE</a>, Environment Variables (<a href="libpq-envars.html" title="28.11.Environment Variables">Section28.11, &#8220;Environment Variables&#8221;</a>)</span>
</div>
</div></body>
</html>