diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 01:36:05 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 01:36:05 +0000 |
commit | 721e53785d837d48dc33dd68aa77c42ece7c9afb (patch) | |
tree | 59c7bf34cada497f50c61072826d6fa0de080b57 /src/backend/commands/typecmds.c | |
parent | 9e4a2de8448997924e74ace8dfd9ccd05acb2d08 (diff) | |
download | postgresql-721e53785d837d48dc33dd68aa77c42ece7c9afb.tar.gz postgresql-721e53785d837d48dc33dd68aa77c42ece7c9afb.zip |
Solve the problem of OID collisions by probing for duplicate OIDs
whenever we generate a new OID. This prevents occasional duplicate-OID
errors that can otherwise occur once the OID counter has wrapped around.
Duplicate relfilenode values are also checked for when creating new
physical files. Per my recent proposal.
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r-- | src/backend/commands/typecmds.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 31e43cd4281..e0c3a311eac 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.78 2005/08/04 01:09:28 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.79 2005/08/12 01:35:58 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -339,7 +339,6 @@ DefineType(List *names, List *parameters) typoid = TypeCreate(typeName, /* type name */ typeNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ internalLength, /* internal size */ @@ -372,7 +371,6 @@ DefineType(List *names, List *parameters) TypeCreate(shadow_type, /* type name */ typeNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ -1, /* internal size */ @@ -724,7 +722,6 @@ DefineDomain(CreateDomainStmt *stmt) domainoid = TypeCreate(domainName, /* type name */ domainNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (none here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ internalLength, /* internal size */ |