mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
SQL:2008 syntax CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.450 2008/10/14 17:12:32 tgl Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.451 2008/10/27 09:37:46 petere Exp $ -->
|
||||
|
||||
<chapter id="functions">
|
||||
<title>Functions and Operators</title>
|
||||
@ -3184,7 +3184,8 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
|
||||
function fails and returns null. To indicate the part of the
|
||||
pattern that should be returned on success, the pattern must contain
|
||||
two occurrences of the escape character followed by a double quote
|
||||
(<literal>"</>). The text matching the portion of the pattern
|
||||
(<literal>"</>). <!-- " font-lock sanity -->
|
||||
The text matching the portion of the pattern
|
||||
between these markers is returned.
|
||||
</para>
|
||||
|
||||
@ -10932,6 +10933,12 @@ postgres=# select * from unnest2(array[[1,2],[3,4]]);
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal><function>current_catalog</function></literal></entry>
|
||||
<entry><type>name</type></entry>
|
||||
<entry>name of current database (called <quote>catalog</quote> in the SQL standard)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>current_database</function>()</literal></entry>
|
||||
<entry><type>name</type></entry>
|
||||
@ -10939,7 +10946,7 @@ postgres=# select * from unnest2(array[[1,2],[3,4]]);
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal><function>current_schema</function>()</literal></entry>
|
||||
<entry><literal><function>current_schema</function>[()]</literal></entry>
|
||||
<entry><type>name</type></entry>
|
||||
<entry>name of current schema</entry>
|
||||
</row>
|
||||
@ -11055,6 +11062,10 @@ postgres=# select * from unnest2(array[[1,2],[3,4]]);
|
||||
<secondary>current</secondary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>current_catalog</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>current_database</primary>
|
||||
</indexterm>
|
||||
@ -11083,9 +11094,12 @@ postgres=# select * from unnest2(array[[1,2],[3,4]]);
|
||||
|
||||
<note>
|
||||
<para>
|
||||
<function>current_user</function>, <function>session_user</function>, and
|
||||
<function>user</function> have special syntactic status in <acronym>SQL</acronym>:
|
||||
they must be called without trailing parentheses.
|
||||
<function>current_catalog</function>, <function>current_schema</function>,
|
||||
<function>current_user</function>, <function>session_user</function>,
|
||||
and <function>user</function> have special syntactic status
|
||||
in <acronym>SQL</acronym>: they must be called without trailing
|
||||
parentheses (optional in PostgreSQL in the case
|
||||
of <function>current_schema</function>).
|
||||
</para>
|
||||
</note>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/set.sgml,v 1.92 2008/03/10 12:39:22 tgl Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/set.sgml,v 1.93 2008/10/27 09:37:47 petere Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -150,6 +150,17 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
|
||||
special syntax:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>SCHEMA</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>SET SCHEMA '<replaceable>value</>'</> is an alias for
|
||||
<literal>SET search_path TO <replaceable>value</></>. Only one
|
||||
schema can be specified using this syntax.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>NAMES</literal></term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user