mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
Fix object identities for pg_conversion objects
We were neglecting to schema-qualify them.
Backpatch to 9.3, where object identities were introduced as a concept
by commit f8348ea32e
.
This commit is contained in:
parent
a7ad5cf0cf
commit
a196e67f93
@ -2785,6 +2785,7 @@ getObjectIdentity(const ObjectAddress *object)
|
||||
{
|
||||
HeapTuple conTup;
|
||||
Form_pg_conversion conForm;
|
||||
char *schema;
|
||||
|
||||
conTup = SearchSysCache1(CONVOID,
|
||||
ObjectIdGetDatum(object->objectId));
|
||||
@ -2792,8 +2793,11 @@ getObjectIdentity(const ObjectAddress *object)
|
||||
elog(ERROR, "cache lookup failed for conversion %u",
|
||||
object->objectId);
|
||||
conForm = (Form_pg_conversion) GETSTRUCT(conTup);
|
||||
appendStringInfo(&buffer, "%s",
|
||||
quote_identifier(NameStr(conForm->conname)));
|
||||
schema = get_namespace_name(conForm->connamespace);
|
||||
appendStringInfoString(&buffer,
|
||||
quote_qualified_identifier(schema,
|
||||
NameStr(conForm->conname)));
|
||||
pfree(schema);
|
||||
ReleaseSysCache(conTup);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user