summaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_proc.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-10-02 23:50:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-10-02 23:50:16 +0000
commitaa731ed8433914641e42f32fec0fcf27f01aab7e (patch)
tree7120217579cb1a88552c7a1ee44cc0a0749d6e3e /src/include/catalog/pg_proc.h
parent1b61ee3c69ccd869bddc56ae1021797a517ca9b7 (diff)
downloadpostgresql-aa731ed8433914641e42f32fec0fcf27f01aab7e.tar.gz
Change nextval and other sequence functions to specify their sequence
argument as a 'regclass' value instead of a text string. The frontend conversion of text string to pg_class OID is now encapsulated as an implicitly-invocable coercion from text to regclass. This provides backwards compatibility to the old behavior when the sequence argument is explicitly typed as 'text'. When the argument is just an unadorned literal string, it will be taken as 'regclass', which means that the stored representation will be an OID. This solves longstanding problems with renaming sequences that are referenced in default expressions, as well as new-in-8.1 problems with renaming such sequences' schemas or moving them to another schema. All per recent discussion. Along the way, fix some rather serious problems in dbmirror's support for mirroring sequence operations (int4 vs int8 confusion for instance).
Diffstat (limited to 'src/include/catalog/pg_proc.h')
-rw-r--r--src/include/catalog/pg_proc.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 4b25833b17..8c7f5b438c 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.385 2005/09/16 05:35:40 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.386 2005/10/02 23:50:11 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2073,14 +2073,14 @@ DATA(insert OID = 1572 ( notlike PGNSP PGUID 12 f f t f i 2 16 "19 25" _null_
DESCR("does not match LIKE expression");
-/* SEQUENCEs nextval & currval functions */
-DATA(insert OID = 1574 ( nextval PGNSP PGUID 12 f f t f v 1 20 "25" _null_ _null_ _null_ nextval - _null_ ));
+/* SEQUENCE functions */
+DATA(insert OID = 1574 ( nextval PGNSP PGUID 12 f f t f v 1 20 "2205" _null_ _null_ _null_ nextval_oid - _null_ ));
DESCR("sequence next value");
-DATA(insert OID = 1575 ( currval PGNSP PGUID 12 f f t f v 1 20 "25" _null_ _null_ _null_ currval - _null_ ));
+DATA(insert OID = 1575 ( currval PGNSP PGUID 12 f f t f v 1 20 "2205" _null_ _null_ _null_ currval_oid - _null_ ));
DESCR("sequence current value");
-DATA(insert OID = 1576 ( setval PGNSP PGUID 12 f f t f v 2 20 "25 20" _null_ _null_ _null_ setval - _null_ ));
+DATA(insert OID = 1576 ( setval PGNSP PGUID 12 f f t f v 2 20 "2205 20" _null_ _null_ _null_ setval_oid - _null_ ));
DESCR("set sequence value");
-DATA(insert OID = 1765 ( setval PGNSP PGUID 12 f f t f v 3 20 "25 20 16" _null_ _null_ _null_ setval_and_iscalled - _null_ ));
+DATA(insert OID = 1765 ( setval PGNSP PGUID 12 f f t f v 3 20 "2205 20 16" _null_ _null_ _null_ setval3_oid - _null_ ));
DESCR("set sequence value and iscalled status");
DATA(insert OID = 1579 ( varbit_in PGNSP PGUID 12 f f t f i 3 1562 "2275 26 23" _null_ _null_ _null_ varbit_in - _null_ ));
@@ -3190,6 +3190,8 @@ DATA(insert OID = 2220 ( regtypein PGNSP PGUID 12 f f t f s 1 2206 "2275" _nu
DESCR("I/O");
DATA(insert OID = 2221 ( regtypeout PGNSP PGUID 12 f f t f s 1 2275 "2206" _null_ _null_ _null_ regtypeout - _null_ ));
DESCR("I/O");
+DATA(insert OID = 1079 ( regclass PGNSP PGUID 12 f f t f s 1 2205 "25" _null_ _null_ _null_ text_regclass - _null_ ));
+DESCR("convert text to regclass");
DATA(insert OID = 2246 ( fmgr_internal_validator PGNSP PGUID 12 f f t f s 1 2278 "26" _null_ _null_ _null_ fmgr_internal_validator - _null_ ));
DESCR("(internal)");