mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Clean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
didn't create a dependency from the new conversion to its schema. Back-patch to all supported releases.
This commit is contained in:
parent
4c0bd228fa
commit
a83c71eb24
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.32 2006/07/14 14:52:17 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.33 2006/08/31 17:31:33 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -119,16 +119,16 @@ ConversionCreate(const char *conname, Oid connamespace,
|
|||||||
referenced.objectSubId = 0;
|
referenced.objectSubId = 0;
|
||||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||||
|
|
||||||
|
/* create dependency on namespace */
|
||||||
|
referenced.classId = NamespaceRelationId;
|
||||||
|
referenced.objectId = connamespace;
|
||||||
|
referenced.objectSubId = 0;
|
||||||
|
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||||
|
|
||||||
/* create dependency on owner */
|
/* create dependency on owner */
|
||||||
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
|
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
|
||||||
conowner);
|
conowner);
|
||||||
|
|
||||||
/* create dependency on namespace */
|
|
||||||
myself.classId = ConversionRelationId;
|
|
||||||
referenced.classId = NamespaceRelationId;
|
|
||||||
referenced.objectId = connamespace;
|
|
||||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
|
||||||
|
|
||||||
heap_freetuple(tup);
|
heap_freetuple(tup);
|
||||||
heap_close(rel, RowExclusiveLock);
|
heap_close(rel, RowExclusiveLock);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user