Make the last query in object_address work again
authorTomas Vondra <tomas@2ndquadrant.com>
Sun, 9 Jul 2017 12:42:52 +0000 (14:42 +0200)
committerTomas Vondra <tomas@2ndquadrant.com>
Sun, 9 Jul 2017 12:42:52 +0000 (14:42 +0200)
The last query in the test was not really doing anything as it failed
on the first object unsupported by Postgres-XL. So remove all such
unsupported objects, to make it work again.

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

index 79aeb88386e4cd8bc615938ba8529e9c87661dac..f6c26228b62901d979b7577e5314f995d4dce153 100644 (file)
@@ -186,9 +186,7 @@ WITH objects (type, name, args) AS (VALUES
                                -- toast table
                                ('view', '{addr_nsp, genview}', '{}'),
                                ('materialized view', '{addr_nsp, genmatview}', '{}'),
-                               ('foreign table', '{addr_nsp, genftable}', '{}'),
                                ('table column', '{addr_nsp, gentable, b}', '{}'),
-                               ('foreign table column', '{addr_nsp, genftable, a}', '{}'),
                                ('aggregate', '{addr_nsp, genaggr}', '{int4}'),
                                ('function', '{pg_catalog, pg_identify_object}', '{pg_catalog.oid, pg_catalog.oid, int4}'),
                                ('type', '{pg_catalog._int4}', '{}'),
@@ -209,7 +207,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('operator of access method', '{btree,integer_ops,1}', '{integer,integer}'),
                                ('function of access method', '{btree,integer_ops,2}', '{integer,integer}'),
                                ('rule', '{addr_nsp, genview, _RETURN}', '{}'),
-                               ('trigger', '{addr_nsp, gentable, t}', '{}'),
                                ('schema', '{addr_nsp}', '{}'),
                                ('text search parser', '{addr_ts_prs}', '{}'),
                                ('text search dictionary', '{addr_ts_dict}', '{}'),
@@ -218,9 +215,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('role', '{regress_addr_user}', '{}'),
                                -- database
                                -- tablespace
-                               ('foreign-data wrapper', '{addr_fdw}', '{}'),
-                               ('server', '{addr_fserv}', '{}'),
-                               ('user mapping', '{regress_addr_user}', '{integer}'),
                                ('default acl', '{regress_addr_user,public}', '{r}'),
                                ('default acl', '{regress_addr_user}', '{r}'),
                                -- extension
@@ -228,9 +222,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('policy', '{addr_nsp, gentable, genpol}', '{}'),
                                ('transform', '{int}', '{sql}'),
                                ('access method', '{btree}', '{}'),
-                               ('publication', '{addr_pub}', '{}'),
-                               ('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
-                               ('subscription', '{addr_sub}', '{}'),
                                ('statistics object', '{addr_nsp, gentable_stat}', '{}')
         )
 SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,
@@ -240,8 +231,48 @@ SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,
          FROM objects, pg_get_object_address(type, name, args) addr1,
                        pg_identify_object_as_address(classid, objid, objsubid) ioa(typ,nms,args),
                        pg_get_object_address(typ, nms, ioa.args) as addr2
-       ORDER BY addr1.classid, addr1.objid, addr1.subobjid;
-ERROR:  relation "addr_nsp.genftable" does not exist
+       ORDER BY addr1.classid, addr1.objid, addr1.objsubid;
+           type            |   schema   |       name        |                               identity                               | ?column? 
+---------------------------+------------+-------------------+----------------------------------------------------------------------+----------
+ default acl               |            |                   | for role regress_addr_user in schema public on tables                | t
+ default acl               |            |                   | for role regress_addr_user on tables                                 | t
+ type                      | pg_catalog | _int4             | integer[]                                                            | t
+ type                      | addr_nsp   | gencomptype       | addr_nsp.gencomptype                                                 | t
+ type                      | addr_nsp   | genenum           | addr_nsp.genenum                                                     | t
+ type                      | addr_nsp   | gendomain         | addr_nsp.gendomain                                                   | t
+ function                  | pg_catalog |                   | pg_catalog.pg_identify_object(pg_catalog.oid,pg_catalog.oid,integer) | t
+ aggregate                 | addr_nsp   |                   | addr_nsp.genaggr(integer)                                            | t
+ sequence                  | addr_nsp   | gentable_a_seq    | addr_nsp.gentable_a_seq                                              | t
+ table                     | addr_nsp   | gentable          | addr_nsp.gentable                                                    | t
+ table column              | addr_nsp   | gentable          | addr_nsp.gentable.b                                                  | t
+ index                     | addr_nsp   | gentable_pkey     | addr_nsp.gentable_pkey                                               | t
+ view                      | addr_nsp   | genview           | addr_nsp.genview                                                     | t
+ materialized view         | addr_nsp   | genmatview        | addr_nsp.genmatview                                                  | t
+ role                      |            | regress_addr_user | regress_addr_user                                                    | t
+ access method             |            | btree             | btree                                                                | t
+ operator of access method |            |                   | operator 1 (integer, integer) of pg_catalog.integer_ops USING btree  | t
+ function of access method |            |                   | function 2 (integer, integer) of pg_catalog.integer_ops USING btree  | t
+ default value             |            |                   | for addr_nsp.gentable.b                                              | t
+ cast                      |            |                   | (bigint AS integer)                                                  | t
+ table constraint          | addr_nsp   |                   | a_chk on addr_nsp.gentable                                           | t
+ domain constraint         | addr_nsp   |                   | domconstr on addr_nsp.gendomain                                      | t
+ conversion                | pg_catalog | ascii_to_mic      | pg_catalog.ascii_to_mic                                              | t
+ language                  |            | plpgsql           | plpgsql                                                              | t
+ schema                    |            | addr_nsp          | addr_nsp                                                             | t
+ operator class            | pg_catalog | int4_ops          | pg_catalog.int4_ops USING btree                                      | t
+ operator                  | pg_catalog |                   | pg_catalog.+(integer,integer)                                        | t
+ rule                      |            |                   | "_RETURN" on addr_nsp.genview                                        | t
+ operator family           | pg_catalog | integer_ops       | pg_catalog.integer_ops USING btree                                   | t
+ policy                    |            |                   | genpol on addr_nsp.gentable                                          | t
+ statistics object         | addr_nsp   | gentable_stat     | addr_nsp.gentable_stat                                               | t
+ collation                 | pg_catalog | "default"         | pg_catalog."default"                                                 | t
+ transform                 |            |                   | for integer on language sql                                          | t
+ text search dictionary    | addr_nsp   | addr_ts_dict      | addr_nsp.addr_ts_dict                                                | t
+ text search parser        | addr_nsp   | addr_ts_prs       | addr_nsp.addr_ts_prs                                                 | t
+ text search configuration | addr_nsp   | addr_ts_conf      | addr_nsp.addr_ts_conf                                                | t
+ text search template      | addr_nsp   | addr_ts_temp      | addr_nsp.addr_ts_temp                                                | t
+(37 rows)
+
 ---
 --- Cleanup resources
 ---
index ca7ed46e417932e0c4e5fa7bd2e9668e72ab65ec..f8199ffbef5a9a29ec53ee45a582a2b4053a74a0 100644 (file)
@@ -142,9 +142,7 @@ WITH objects (type, name, args) AS (VALUES
                                -- toast table
                                ('view', '{addr_nsp, genview}', '{}'),
                                ('materialized view', '{addr_nsp, genmatview}', '{}'),
-                               ('foreign table', '{addr_nsp, genftable}', '{}'),
                                ('table column', '{addr_nsp, gentable, b}', '{}'),
-                               ('foreign table column', '{addr_nsp, genftable, a}', '{}'),
                                ('aggregate', '{addr_nsp, genaggr}', '{int4}'),
                                ('function', '{pg_catalog, pg_identify_object}', '{pg_catalog.oid, pg_catalog.oid, int4}'),
                                ('type', '{pg_catalog._int4}', '{}'),
@@ -165,7 +163,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('operator of access method', '{btree,integer_ops,1}', '{integer,integer}'),
                                ('function of access method', '{btree,integer_ops,2}', '{integer,integer}'),
                                ('rule', '{addr_nsp, genview, _RETURN}', '{}'),
-                               ('trigger', '{addr_nsp, gentable, t}', '{}'),
                                ('schema', '{addr_nsp}', '{}'),
                                ('text search parser', '{addr_ts_prs}', '{}'),
                                ('text search dictionary', '{addr_ts_dict}', '{}'),
@@ -174,9 +171,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('role', '{regress_addr_user}', '{}'),
                                -- database
                                -- tablespace
-                               ('foreign-data wrapper', '{addr_fdw}', '{}'),
-                               ('server', '{addr_fserv}', '{}'),
-                               ('user mapping', '{regress_addr_user}', '{integer}'),
                                ('default acl', '{regress_addr_user,public}', '{r}'),
                                ('default acl', '{regress_addr_user}', '{r}'),
                                -- extension
@@ -184,9 +178,6 @@ WITH objects (type, name, args) AS (VALUES
                                ('policy', '{addr_nsp, gentable, genpol}', '{}'),
                                ('transform', '{int}', '{sql}'),
                                ('access method', '{btree}', '{}'),
-                               ('publication', '{addr_pub}', '{}'),
-                               ('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
-                               ('subscription', '{addr_sub}', '{}'),
                                ('statistics object', '{addr_nsp, gentable_stat}', '{}')
         )
 SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,