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

Commitd8678ab

Browse files
committed
Make object_address test output easier to update
The object_address test file turns to psql unaligned output for sometests to avoid huge diffs for changes. But this is useful also to theother large test in that file, so apply it there as well. This alsomakes verifying the null and whitespace behavior easier.
1 parentd0ca708 commitd8678ab

File tree

2 files changed

+62
-64
lines changed

2 files changed

+62
-64
lines changed

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

Lines changed: 55 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,11 @@ SELECT pg_get_object_address('subscription', '{one}', '{}');
382382
ERROR: subscription "one" does not exist
383383
SELECT pg_get_object_address('subscription', '{one,two}', '{}');
384384
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
385390
-- test successful cases
386391
WITH objects (type, name, args) AS (VALUES
387392
('table', '{addr_nsp, gentable}'::text[], '{}'::text[]),
@@ -450,60 +455,56 @@ FROM objects,
450455
pg_identify_object_as_address(classid, objid, objsubid) AS ioa (typ, nms, args),
451456
pg_get_object_address(typ, nms, ioa.args) AS addr2
452457
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
507508
---
508509
--- Cleanup resources
509510
---
@@ -537,11 +538,6 @@ DROP USER regress_addr_user;
537538
--
538539
-- Checks for invalid objects
539540
--
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
545541
-- Keep this list in the same order as getObjectIdentityParts()
546542
-- in objectaddress.c.
547543
WITH objects (classid, objid, objsubid) AS (VALUES

‎src/test/regress/sql/object_address.sql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ SELECT pg_get_object_address('publication', '{one,two}', '{}');
145145
SELECT pg_get_object_address('subscription','{one}','{}');
146146
SELECT pg_get_object_address('subscription','{one,two}','{}');
147147

148+
-- Make sure that NULL handling is correct.
149+
\psetnull'NULL'
150+
151+
-- Temporarily disable fancy output, so as future additions never create
152+
-- a large amount of diffs.
153+
\a\t
154+
148155
-- test successful cases
149156
WITH objects (type, name, args)AS (VALUES
150157
('table','{addr_nsp, gentable}'::text[],'{}'::text[]),
@@ -230,11 +237,6 @@ DROP USER regress_addr_user;
230237
--
231238
-- Checks for invalid objects
232239
--
233-
-- Make sure that NULL handling is correct.
234-
\psetnull'NULL'
235-
-- Temporarily disable fancy output, so as future additions never create
236-
-- a large amount of diffs.
237-
\a\t
238240

239241
-- Keep this list in the same order as getObjectIdentityParts()
240242
-- in objectaddress.c.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp