aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml17
-rw-r--r--doc/src/sgml/ref/alter_language.sgml19
-rw-r--r--doc/src/sgml/ref/create_language.sgml20
-rw-r--r--doc/src/sgml/ref/drop_language.sgml6
4 files changed, 50 insertions, 12 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index d89cd8a4984..7d325d1dde5 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.147 2007/03/22 15:46:56 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.148 2007/03/26 16:58:37 tgl Exp $ -->
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
-->
@@ -2656,6 +2656,13 @@
</row>
<row>
+ <entry><structfield>lanowner</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+ <entry>Owner of the language</entry>
+ </row>
+
+ <row>
<entry><structfield>lanispl</structfield></entry>
<entry><type>bool</type></entry>
<entry></entry>
@@ -3265,7 +3272,7 @@
<table>
<title><structname>pg_pltemplate</> Columns</title>
- <tgroup cols=4>
+ <tgroup cols=3>
<thead>
<row>
<entry>Name</entry>
@@ -3288,6 +3295,12 @@
</row>
<row>
+ <entry><structfield>tmpldbacreate</structfield></entry>
+ <entry><type>boolean</type></entry>
+ <entry>True if language may be created by a database owner</entry>
+ </row>
+
+ <row>
<entry><structfield>tmplhandler</structfield></entry>
<entry><type>text</type></entry>
<entry>Name of call handler function</entry>
diff --git a/doc/src/sgml/ref/alter_language.sgml b/doc/src/sgml/ref/alter_language.sgml
index 9c336f163bf..e0cdb9d5a56 100644
--- a/doc/src/sgml/ref/alter_language.sgml
+++ b/doc/src/sgml/ref/alter_language.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.6 2006/09/16 00:30:16 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_language.sgml,v 1.7 2007/03/26 16:58:38 tgl Exp $
PostgreSQL documentation
-->
@@ -20,7 +20,8 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
-ALTER LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER [ PROCEDURAL ] LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER [ PROCEDURAL ] LANGUAGE <replaceable>name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,8 +30,9 @@ ALTER LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</r
<para>
<command>ALTER LANGUAGE</command> changes the definition of a
- language. The only functionality is to rename the language. Only
- a superuser can rename languages.
+ procedural language. The only functionality is to rename the language or
+ assign a new owner. You must be superuser or owner of the language to
+ use <command>ALTER LANGUAGE</command>.
</para>
</refsect1>
@@ -55,6 +57,15 @@ ALTER LANGUAGE <replaceable>name</replaceable> RENAME TO <replaceable>newname</r
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable>new_owner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the language
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
diff --git a/doc/src/sgml/ref/create_language.sgml b/doc/src/sgml/ref/create_language.sgml
index b09b38bee99..bb853feb19c 100644
--- a/doc/src/sgml/ref/create_language.sgml
+++ b/doc/src/sgml/ref/create_language.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_language.sgml,v 1.43 2007/01/31 23:26:03 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_language.sgml,v 1.44 2007/03/26 16:58:38 tgl Exp $
PostgreSQL documentation
-->
@@ -34,9 +34,7 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">name</
<productname>PostgreSQL</productname> user can register a new
procedural language with a <productname>PostgreSQL</productname>
database. Subsequently, functions and trigger procedures can be
- defined in this new language. The user must have the
- <productname>PostgreSQL</productname> superuser privilege to
- register a new language.
+ defined in this new language.
</para>
<para>
@@ -64,6 +62,20 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">name</
old dump files, which are likely to contain out-of-date information
about language support functions.
</para>
+
+ <para>
+ Ordinarily, the user must have the
+ <productname>PostgreSQL</productname> superuser privilege to
+ register a new language. However, the owner of a database can register
+ a new language within that database if the language is listed in
+ the <structname>pg_pltemplate</structname> catalog and is marked
+ as allowed to be created by database owners (<structfield>tmpldbacreate</>
+ is true). The default is that trusted languages can be created
+ by database owners, but this can be adjusted by superusers by modifying
+ the contents of <structname>pg_pltemplate</structname>.
+ The creator of a language becomes its owner and can later
+ drop it, rename it, or assign it to a new owner.
+ </para>
</refsect1>
<refsect1 id="sql-createlanguage-parameters">
diff --git a/doc/src/sgml/ref/drop_language.sgml b/doc/src/sgml/ref/drop_language.sgml
index ad37287da67..1e3c960a720 100644
--- a/doc/src/sgml/ref/drop_language.sgml
+++ b/doc/src/sgml/ref/drop_language.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.24 2007/01/31 23:26:03 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.25 2007/03/26 16:58:38 tgl Exp $
PostgreSQL documentation
-->
@@ -31,6 +31,8 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="PARAMETER">name</
<command>DROP LANGUAGE</command> will remove the definition
of the previously registered procedural language called
<replaceable class="parameter">name</replaceable>.
+ You must be superuser or owner of the language to
+ use <command>DROP LANGUAGE</command>.
</para>
</refsect1>
@@ -43,7 +45,7 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="PARAMETER">name</
<term><literal>IF EXISTS</literal></term>
<listitem>
<para>
- Do not throw an error if the function does not exist. A notice is issued
+ Do not throw an error if the language does not exist. A notice is issued
in this case.
</para>
</listitem>