mirror of
https://github.com/postgres/postgres.git
synced 2026-03-27 21:03:14 -04: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
a75dfb73e1
commit
66463a3cf1
1 changed files with 5 additions and 1 deletions
|
|
@ -2808,6 +2808,7 @@ getObjectIdentity(const ObjectAddress *object)
|
|||
{
|
||||
HeapTuple conTup;
|
||||
Form_pg_conversion conForm;
|
||||
char *schema;
|
||||
|
||||
conTup = SearchSysCache1(CONVOID,
|
||||
ObjectIdGetDatum(object->objectId));
|
||||
|
|
@ -2815,8 +2816,11 @@ getObjectIdentity(const ObjectAddress *object)
|
|||
elog(ERROR, "cache lookup failed for conversion %u",
|
||||
object->objectId);
|
||||
conForm = (Form_pg_conversion) GETSTRUCT(conTup);
|
||||
schema = get_namespace_name(conForm->connamespace);
|
||||
appendStringInfoString(&buffer,
|
||||
quote_identifier(NameStr(conForm->conname)));
|
||||
quote_qualified_identifier(schema,
|
||||
NameStr(conForm->conname)));
|
||||
pfree(schema);
|
||||
ReleaseSysCache(conTup);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue