Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d90679

Browse files
committed
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 conceptby commitf8348ea.
1 parent297b2c1 commit0d90679

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/backend/catalog/objectaddress.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3415,17 +3415,21 @@ getObjectIdentityParts(const ObjectAddress *object,
34153415
{
34163416
HeapTupleconTup;
34173417
Form_pg_conversionconForm;
3418+
char*schema;
34183419

34193420
conTup=SearchSysCache1(CONVOID,
34203421
ObjectIdGetDatum(object->objectId));
34213422
if (!HeapTupleIsValid(conTup))
34223423
elog(ERROR,"cache lookup failed for conversion %u",
34233424
object->objectId);
34243425
conForm= (Form_pg_conversion)GETSTRUCT(conTup);
3426+
schema=get_namespace_name(conForm->connamespace);
34253427
appendStringInfoString(&buffer,
3426-
quote_identifier(NameStr(conForm->conname)));
3428+
quote_qualified_identifier(schema,
3429+
NameStr(conForm->conname)));
34273430
if (objname)
34283431
*objname=list_make1(pstrdup(NameStr(conForm->conname)));
3432+
pfree(schema);
34293433
ReleaseSysCache(conTup);
34303434
break;
34313435
}

‎src/test/regress/expected/object_address.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)).*,
370370
cast | | | (bigint AS integer) | t
371371
table constraint | addr_nsp | | a_chk on addr_nsp.gentable | t
372372
domain constraint | addr_nsp | | domconstr on addr_nsp.gendomain | t
373-
conversion | pg_catalog | ascii_to_mic | ascii_to_mic | t
373+
conversion | pg_catalog | ascii_to_mic |pg_catalog.ascii_to_mic | t
374374
language | | plpgsql | plpgsql | t
375375
schema | | addr_nsp | addr_nsp | t
376376
operator class | pg_catalog | int4_ops | pg_catalog.int4_ops for btree | t

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp