|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.353 2007/01/29 13:24:30 petere Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.354 2007/01/30 02:39:27 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="functions">
|
4 | 4 | <title>Functions and Operators</title>
|
@@ -9892,12 +9892,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
|
9892 | 9892 | </para>
|
9893 | 9893 |
|
9894 | 9894 | <para>
|
9895 |
| - <function>pg_get_serial_sequence</function> fetches the name of the |
9896 |
| - sequence associated with a column, or NULL if there is no sequence |
9897 |
| - associated with the column. The result is suitably formatted for passing |
9898 |
| - to the sequence functions (see <xref linkend="functions-sequence">). |
9899 |
| - This association can be modified or removed with <command>ALTER SEQUENCE |
9900 |
| - OWNED BY</>. (The function probably should have been called |
| 9895 | + <function>pg_get_serial_sequence</function> returns the name of the |
| 9896 | + sequence associated with a column, or NULL if no sequence is associated |
| 9897 | + with the column. The first input parameter is a table name with |
| 9898 | + optional schema, and the second parameter is a column name. Because |
| 9899 | + the first parameter is potentially a schema and table, it is not treated |
| 9900 | + as a double-quoted identifier, meaning it is lowercased by default, |
| 9901 | + while the second parameter, being just a column name, is treated as |
| 9902 | + double-quoted and has its case preserved. The function returns a value |
| 9903 | + suitably formatted for passing to the sequence functions (see <xref |
| 9904 | + linkend="functions-sequence">). This association can be modified or |
| 9905 | + removed with <command>ALTER SEQUENCE OWNED BY</>. (The function |
| 9906 | + probably should have been called |
9901 | 9907 | <function>pg_get_owned_sequence</function>; its name reflects the fact
|
9902 | 9908 | that it's typically used with <type>serial</> or <type>bigserial</>
|
9903 | 9909 | columns.)
|
|
0 commit comments