mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Clarify paramater handling for pg_get_serial_sequence().
This commit is contained in:
parent
01d9754bd9
commit
c22f642f2f
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.347.2.1 2007/01/12 23:35:03 tgl Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.347.2.2 2007/01/30 02:32:04 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="functions">
|
<chapter id="functions">
|
||||||
<title>Functions and Operators</title>
|
<title>Functions and Operators</title>
|
||||||
@ -9882,12 +9882,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<function>pg_get_serial_sequence</function> fetches the name of the
|
<function>pg_get_serial_sequence</function> returns the name of the
|
||||||
sequence associated with a column, or NULL if there is no sequence
|
sequence associated with a column, or NULL if no sequence is associated
|
||||||
associated with the column. The result is suitably formatted for passing
|
with the column. The first input parameter is a table name with
|
||||||
to the sequence functions (see <xref linkend="functions-sequence">).
|
optional schema, and the second parameter is a column name. Because
|
||||||
This association can be modified or removed with <command>ALTER SEQUENCE
|
the first parameter is potentially a schema and table, it is not treated
|
||||||
OWNED BY</>. (The function probably should have been called
|
as a double-quoted identifier, meaning it is lowercased by default,
|
||||||
|
while the second parameter, being just a column name, is treated as
|
||||||
|
double-quoted and has its case preserved. The function returns a value
|
||||||
|
suitably formatted for passing to the sequence functions (see <xref
|
||||||
|
linkend="functions-sequence">). This association can be modified or
|
||||||
|
removed with <command>ALTER SEQUENCE OWNED BY</>. (The function
|
||||||
|
probably should have been called
|
||||||
<function>pg_get_owned_sequence</function>; its name reflects the fact
|
<function>pg_get_owned_sequence</function>; its name reflects the fact
|
||||||
that it's typically used with <type>serial</> or <type>bigserial</>
|
that it's typically used with <type>serial</> or <type>bigserial</>
|
||||||
columns.)
|
columns.)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* ruleutils.c - Functions to convert stored expressions/querytrees
|
* ruleutils.c - Functions to convert stored expressions/querytrees
|
||||||
* back to source text
|
* back to source text
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.235.2.1 2007/01/25 04:17:56 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.235.2.2 2007/01/30 02:32:05 momjian Exp $
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
@ -1232,6 +1232,8 @@ pg_get_userbyid(PG_FUNCTION_ARGS)
|
|||||||
* pg_get_serial_sequence
|
* pg_get_serial_sequence
|
||||||
* Get the name of the sequence used by a serial column,
|
* Get the name of the sequence used by a serial column,
|
||||||
* formatted suitably for passing to setval, nextval or currval.
|
* formatted suitably for passing to setval, nextval or currval.
|
||||||
|
* First parameter is not treated as double-quoted, second parameter
|
||||||
|
* is --- see documentation for reason.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
pg_get_serial_sequence(PG_FUNCTION_ARGS)
|
pg_get_serial_sequence(PG_FUNCTION_ARGS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user