1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-24 14:22:24 +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:
Tom Lane
2006-08-31 17:31:40 +00:00
parent 780451b43d
commit 1e64862ab3

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28.2.2 2006/05/30 13:36:40 momjian Exp $
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28.2.3 2006/08/31 17:31:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -18,6 +18,7 @@
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/pg_conversion.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_proc.h"
#include "catalog/namespace.h"
#include "utils/builtins.h"
@ -120,6 +121,12 @@ ConversionCreate(const char *conname, Oid connamespace,
referenced.objectSubId = 0;
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 */
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
conowner);