@@ -382,6 +382,11 @@ SELECT pg_get_object_address('subscription', '{one}', '{}');
382
382
ERROR: subscription "one" does not exist
383
383
SELECT pg_get_object_address('subscription', '{one,two}', '{}');
384
384
ERROR: name list length must be exactly 1
385
+ -- Make sure that NULL handling is correct.
386
+ \pset null 'NULL'
387
+ -- Temporarily disable fancy output, so as future additions never create
388
+ -- a large amount of diffs.
389
+ \a\t
385
390
-- test successful cases
386
391
WITH objects (type, name, args) AS (VALUES
387
392
('table', '{addr_nsp, gentable}'::text[], '{}'::text[]),
@@ -450,60 +455,56 @@ FROM objects,
450
455
pg_identify_object_as_address(classid, objid, objsubid) AS ioa (typ, nms, args),
451
456
pg_get_object_address(typ, nms, ioa.args) AS addr2
452
457
ORDER BY addr1.classid, addr1.objid, addr1.objsubid;
453
- type | schema | name | identity | roundtrip
454
- ---------------------------+------------+-------------------+----------------------------------------------------------------------+-----------
455
- default acl | | | for role regress_addr_user in schema public on tables | t
456
- default acl | | | for role regress_addr_user on tables | t
457
- type | pg_catalog | _int4 | integer[] | t
458
- type | addr_nsp | gencomptype | addr_nsp.gencomptype | t
459
- type | addr_nsp | genenum | addr_nsp.genenum | t
460
- type | addr_nsp | gendomain | addr_nsp.gendomain | t
461
- function | pg_catalog | | pg_catalog.pg_identify_object(pg_catalog.oid,pg_catalog.oid,integer) | t
462
- aggregate | addr_nsp | | addr_nsp.genaggr(integer) | t
463
- procedure | addr_nsp | | addr_nsp.proc(integer) | t
464
- sequence | addr_nsp | gentable_a_seq | addr_nsp.gentable_a_seq | t
465
- table | addr_nsp | gentable | addr_nsp.gentable | t
466
- table column | addr_nsp | gentable | addr_nsp.gentable.b | t
467
- index | addr_nsp | gentable_pkey | addr_nsp.gentable_pkey | t
468
- table | addr_nsp | parttable | addr_nsp.parttable | t
469
- index | addr_nsp | parttable_pkey | addr_nsp.parttable_pkey | t
470
- view | addr_nsp | genview | addr_nsp.genview | t
471
- materialized view | addr_nsp | genmatview | addr_nsp.genmatview | t
472
- foreign table | addr_nsp | genftable | addr_nsp.genftable | t
473
- foreign table column | addr_nsp | genftable | addr_nsp.genftable.a | t
474
- role | | regress_addr_user | regress_addr_user | t
475
- server | | addr_fserv | addr_fserv | t
476
- user mapping | | | regress_addr_user on server integer | t
477
- foreign-data wrapper | | addr_fdw | addr_fdw | t
478
- access method | | btree | btree | t
479
- operator of access method | | | operator 1 (integer, integer) of pg_catalog.integer_ops USING btree | t
480
- function of access method | | | function 2 (integer, integer) of pg_catalog.integer_ops USING btree | t
481
- default value | | | for addr_nsp.gentable.b | t
482
- cast | | | (bigint AS integer) | t
483
- table constraint | addr_nsp | | a_chk on addr_nsp.gentable | t
484
- domain constraint | addr_nsp | | domconstr on addr_nsp.gendomain | t
485
- conversion | pg_catalog | koi8_r_to_mic | pg_catalog.koi8_r_to_mic | t
486
- language | | plpgsql | plpgsql | t
487
- schema | | addr_nsp | addr_nsp | t
488
- operator class | pg_catalog | int4_ops | pg_catalog.int4_ops USING btree | t
489
- operator | pg_catalog | | pg_catalog.+(integer,integer) | t
490
- rule | | | "_RETURN" on addr_nsp.genview | t
491
- trigger | | | t on addr_nsp.gentable | t
492
- operator family | pg_catalog | integer_ops | pg_catalog.integer_ops USING btree | t
493
- policy | | | genpol on addr_nsp.gentable | t
494
- statistics object | addr_nsp | gentable_stat | addr_nsp.gentable_stat | t
495
- collation | pg_catalog | "default" | pg_catalog."default" | t
496
- transform | | | for integer on language sql | t
497
- text search dictionary | addr_nsp | addr_ts_dict | addr_nsp.addr_ts_dict | t
498
- text search parser | addr_nsp | addr_ts_prs | addr_nsp.addr_ts_prs | t
499
- text search configuration | addr_nsp | addr_ts_conf | addr_nsp.addr_ts_conf | t
500
- text search template | addr_nsp | addr_ts_temp | addr_nsp.addr_ts_temp | t
501
- subscription | | regress_addr_sub | regress_addr_sub | t
502
- publication | | addr_pub | addr_pub | t
503
- publication relation | | | addr_nsp.gentable in publication addr_pub | t
504
- publication namespace | | | addr_nsp in publication addr_pub_schema | t
505
- (50 rows)
506
-
458
+ default acl|NULL|NULL|for role regress_addr_user in schema public on tables|t
459
+ default acl|NULL|NULL|for role regress_addr_user on tables|t
460
+ type|pg_catalog|_int4|integer[]|t
461
+ type|addr_nsp|gencomptype|addr_nsp.gencomptype|t
462
+ type|addr_nsp|genenum|addr_nsp.genenum|t
463
+ type|addr_nsp|gendomain|addr_nsp.gendomain|t
464
+ function|pg_catalog|NULL|pg_catalog.pg_identify_object(pg_catalog.oid,pg_catalog.oid,integer)|t
465
+ aggregate|addr_nsp|NULL|addr_nsp.genaggr(integer)|t
466
+ procedure|addr_nsp|NULL|addr_nsp.proc(integer)|t
467
+ sequence|addr_nsp|gentable_a_seq|addr_nsp.gentable_a_seq|t
468
+ table|addr_nsp|gentable|addr_nsp.gentable|t
469
+ table column|addr_nsp|gentable|addr_nsp.gentable.b|t
470
+ index|addr_nsp|gentable_pkey|addr_nsp.gentable_pkey|t
471
+ table|addr_nsp|parttable|addr_nsp.parttable|t
472
+ index|addr_nsp|parttable_pkey|addr_nsp.parttable_pkey|t
473
+ view|addr_nsp|genview|addr_nsp.genview|t
474
+ materialized view|addr_nsp|genmatview|addr_nsp.genmatview|t
475
+ foreign table|addr_nsp|genftable|addr_nsp.genftable|t
476
+ foreign table column|addr_nsp|genftable|addr_nsp.genftable.a|t
477
+ role|NULL|regress_addr_user|regress_addr_user|t
478
+ server|NULL|addr_fserv|addr_fserv|t
479
+ user mapping|NULL|NULL|regress_addr_user on server integer|t
480
+ foreign-data wrapper|NULL|addr_fdw|addr_fdw|t
481
+ access method|NULL|btree|btree|t
482
+ operator of access method|NULL|NULL|operator 1 (integer, integer) of pg_catalog.integer_ops USING btree|t
483
+ function of access method|NULL|NULL|function 2 (integer, integer) of pg_catalog.integer_ops USING btree|t
484
+ default value|NULL|NULL|for addr_nsp.gentable.b|t
485
+ cast|NULL|NULL|(bigint AS integer)|t
486
+ table constraint|addr_nsp|NULL|a_chk on addr_nsp.gentable|t
487
+ domain constraint|addr_nsp|NULL|domconstr on addr_nsp.gendomain|t
488
+ conversion|pg_catalog|koi8_r_to_mic|pg_catalog.koi8_r_to_mic|t
489
+ language|NULL|plpgsql|plpgsql|t
490
+ schema|NULL|addr_nsp|addr_nsp|t
491
+ operator class|pg_catalog|int4_ops|pg_catalog.int4_ops USING btree|t
492
+ operator|pg_catalog|NULL|pg_catalog.+(integer,integer)|t
493
+ rule|NULL|NULL|"_RETURN" on addr_nsp.genview|t
494
+ trigger|NULL|NULL|t on addr_nsp.gentable|t
495
+ operator family|pg_catalog|integer_ops|pg_catalog.integer_ops USING btree|t
496
+ policy|NULL|NULL|genpol on addr_nsp.gentable|t
497
+ statistics object|addr_nsp|gentable_stat|addr_nsp.gentable_stat|t
498
+ collation|pg_catalog|"default"|pg_catalog."default"|t
499
+ transform|NULL|NULL|for integer on language sql|t
500
+ text search dictionary|addr_nsp|addr_ts_dict|addr_nsp.addr_ts_dict|t
501
+ text search parser|addr_nsp|addr_ts_prs|addr_nsp.addr_ts_prs|t
502
+ text search configuration|addr_nsp|addr_ts_conf|addr_nsp.addr_ts_conf|t
503
+ text search template|addr_nsp|addr_ts_temp|addr_nsp.addr_ts_temp|t
504
+ subscription|NULL|regress_addr_sub|regress_addr_sub|t
505
+ publication|NULL|addr_pub|addr_pub|t
506
+ publication relation|NULL|NULL|addr_nsp.gentable in publication addr_pub|t
507
+ publication namespace|NULL|NULL|addr_nsp in publication addr_pub_schema|t
507
508
---
508
509
--- Cleanup resources
509
510
---
@@ -537,11 +538,6 @@ DROP USER regress_addr_user;
537
538
--
538
539
-- Checks for invalid objects
539
540
--
540
- -- Make sure that NULL handling is correct.
541
- \pset null 'NULL'
542
- -- Temporarily disable fancy output, so as future additions never create
543
- -- a large amount of diffs.
544
- \a\t
545
541
-- Keep this list in the same order as getObjectIdentityParts()
546
542
-- in objectaddress.c.
547
543
WITH objects (classid, objid, objsubid) AS (VALUES
0 commit comments