pgsql: Change nextval and other sequence functions to specify their

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change nextval and other sequence functions to specify their
Date: 2005-10-02 23:50:16
Message-ID: 20051002235016.C0747D9D43@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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).

Modified Files:
--------------
pgsql/contrib/dbmirror:
MirrorSetup.sql (r1.7 -> r1.8)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbmirror/MirrorSetup.sql.diff?r1=1.7&r2=1.8)
README.dbmirror (r1.10 -> r1.11)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbmirror/README.dbmirror.diff?r1=1.10&r2=1.11)
pending.c (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbmirror/pending.c.diff?r1=1.21&r2=1.22)
pgsql/doc/src/sgml:
datatype.sgml (r1.159 -> r1.160)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/datatype.sgml.diff?r1=1.159&r2=1.160)
func.sgml (r1.286 -> r1.287)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml.diff?r1=1.286&r2=1.287)
release.sgml (r1.380 -> r1.381)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/release.sgml.diff?r1=1.380&r2=1.381)
pgsql/src/backend/catalog:
dependency.c (r1.45 -> r1.46)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c.diff?r1=1.45&r2=1.46)
information_schema.sql (r1.30 -> r1.31)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/information_schema.sql.diff?r1=1.30&r2=1.31)
pgsql/src/backend/commands:
sequence.c (r1.123 -> r1.124)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/sequence.c.diff?r1=1.123&r2=1.124)
tablecmds.c (r1.171 -> r1.172)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.171&r2=1.172)
pgsql/src/backend/parser:
analyze.c (r1.324 -> r1.325)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c.diff?r1=1.324&r2=1.325)
pgsql/src/backend/utils/adt:
regproc.c (r1.94 -> r1.95)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/regproc.c.diff?r1=1.94&r2=1.95)
pgsql/src/bin/psql:
describe.c (r1.124 -> r1.125)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/describe.c.diff?r1=1.124&r2=1.125)
pgsql/src/include/catalog:
catversion.h (r1.302 -> r1.303)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h.diff?r1=1.302&r2=1.303)
pg_cast.h (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_cast.h.diff?r1=1.21&r2=1.22)
pg_proc.h (r1.385 -> r1.386)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h.diff?r1=1.385&r2=1.386)
pgsql/src/include/commands:
sequence.h (r1.32 -> r1.33)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/sequence.h.diff?r1=1.32&r2=1.33)
pgsql/src/include/utils:
builtins.h (r1.264 -> r1.265)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h.diff?r1=1.264&r2=1.265)
pgsql/src/test/regress/expected:
domain.out (r1.33 -> r1.34)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/domain.out.diff?r1=1.33&r2=1.34)
rules.out (r1.107 -> r1.108)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/rules.out.diff?r1=1.107&r2=1.108)
sequence.out (r1.7 -> r1.8)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/sequence.out.diff?r1=1.7&r2=1.8)
pgsql/src/test/regress/input:
constraints.source (r1.11 -> r1.12)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/input/constraints.source.diff?r1=1.11&r2=1.12)
pgsql/src/test/regress/output:
constraints.source (r1.40 -> r1.41)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/output/constraints.source.diff?r1=1.40&r2=1.41)
pgsql/src/test/regress/sql:
domain.sql (r1.18 -> r1.19)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/domain.sql.diff?r1=1.18&r2=1.19)
sequence.sql (r1.3 -> r1.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/sequence.sql.diff?r1=1.3&r2=1.4)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-10-03 00:28:43 pgsql: Expand pg_control information so that we can verify that the
Previous Message Tom Lane 2005-10-01 18:43:20 pgsql: _SPI_execute_plan failed to return result tuple table to caller