Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a83c71e

Browse files
committed
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.
1 parent 4c0bd22 commit a83c71e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/backend/catalog/pg_conversion.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.32 2006/07/14 14:52:17 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.33 2006/08/31 17:31:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -119,16 +119,16 @@ ConversionCreate(const char *conname, Oid connamespace,
119119
referenced.objectSubId = 0;
120120
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
121121

122-
/* create dependency on owner */
123-
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
124-
conowner);
125-
126122
/* create dependency on namespace */
127-
myself.classId = ConversionRelationId;
128123
referenced.classId = NamespaceRelationId;
129124
referenced.objectId = connamespace;
125+
referenced.objectSubId = 0;
130126
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
131127

128+
/* create dependency on owner */
129+
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
130+
conowner);
131+
132132
heap_freetuple(tup);
133133
heap_close(rel, RowExclusiveLock);
134134

0 commit comments

Comments
 (0)