1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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).
This commit is contained in:
Tom Lane
2005-10-02 23:50:16 +00:00
parent 1b61ee3c69
commit aa731ed843
25 changed files with 515 additions and 342 deletions

View File

@ -56,7 +56,7 @@ Pending tables.
Requirements:
---------------------------------
-PostgreSQL-7.4 (Older versions are no longer supported)
-PostgreSQL-8.1 (Older versions are no longer supported)
-Perl 5.6 or 5.8 (Other versions might work)
-PgPerl (http://gborg.postgresql.org/project/pgperl/projdisplay.php)
@ -177,15 +177,15 @@ If you are starting with an empty master database then the slave should
be empty as well. Otherwise use pg_dump to ensure that the slave database
tables are initially identical to the master.
6) Add entries in the MirrorHost table.
6) Add entries in the dbmirror_MirrorHost table.
Each slave database must have an entry in the MirrorHost table.
Each slave database must have an entry in the dbmirror_MirrorHost table.
The name of the host in the MirrorHost table must exactly match the
The name of the host in the dbmirror_MirrorHost table must exactly match the
slaveHost variable for that slave in the configuration file.
For example
INSERT INTO "MirrorHost" ("SlaveName") VALUES ('backup_system');
INSERT INTO dbmirror_MirrorHost (SlaveName) VALUES ('backup_system');
6) Start DBMirror.pl