Fix likely cause of rare ALTER TABLE ADD FOREIGN KEY failures ---
don't assume relname field of a relcache entry will stay valid across lots of operations.
This commit is contained in:
parent
2b0319869a
commit
feb202193d
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.40 2002/09/06 00:01:53 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.41 2002/09/12 21:16:42 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2920,7 +2920,7 @@ createForeignKeyTriggers(Relation rel, FkConstraint *fkconstraint,
|
|||||||
* unfortunately).
|
* unfortunately).
|
||||||
*/
|
*/
|
||||||
myRel = makeRangeVar(get_namespace_name(RelationGetNamespace(rel)),
|
myRel = makeRangeVar(get_namespace_name(RelationGetNamespace(rel)),
|
||||||
RelationGetRelationName(rel));
|
pstrdup(RelationGetRelationName(rel)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preset objectAddress fields
|
* Preset objectAddress fields
|
||||||
|
Loading…
x
Reference in New Issue
Block a user