Update documentation for pg_get_serial_sequence() function.
authorBruce Momjian
Tue, 30 Jan 2007 02:39:27 +0000 (02:39 +0000)
committerBruce Momjian
Tue, 30 Jan 2007 02:39:27 +0000 (02:39 +0000)
doc/src/sgml/func.sgml
src/backend/utils/adt/ruleutils.c

index 4b03b4df148c3a75f80ab5d6c234f2f2d848935d..87a4ce48dec7465f12c87adc5ce31c689ad073f3 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   Functions and Operators
@@ -9892,12 +9892,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
   
 
   
-   pg_get_serial_sequence fetches the name of the
-   sequence associated with a column, or NULL if there is no sequence
-   associated with the column.  The result is suitably formatted for passing
-   to the sequence functions (see ).
-   This association can be modified or removed with ALTER SEQUENCE
-   OWNED BY.  (The function probably should have been called
+   pg_get_serial_sequence returns the name of the
+   sequence associated with a column, or NULL if no sequence is associated
+   with the column.  The first input parameter is a table name with
+   optional schema, and the second parameter is a column name.  Because
+   the first parameter is potentially a schema and table, it is not treated
+   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 
+   linkend="functions-sequence">).  This association can be modified or
+   removed with ALTER SEQUENCE OWNED BY.  (The function
+   probably should have been called
    pg_get_owned_sequence; its name reflects the fact
    that it's typically used with serial or bigserial
    columns.)
index 5222fd3a6021535e5e63a934afa50693619a869b..668266d1c4de29b91b5e1aea52cdd2d235e2843e 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.246 2007/01/25 04:17:46 momjian Exp $
+ *   $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.247 2007/01/30 02:39:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1265,6 +1265,8 @@ pg_get_userbyid(PG_FUNCTION_ARGS)
  * pg_get_serial_sequence
  *     Get the name of the sequence used by a serial column,
  *     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
 pg_get_serial_sequence(PG_FUNCTION_ARGS)