2014-12-23 19:31:29 +01:00
|
|
|
--
|
|
|
|
-- Test for pg_get_object_address
|
|
|
|
--
|
|
|
|
-- Clean up in case a prior regression run failed
|
|
|
|
SET client_min_messages TO 'warning';
|
2016-07-18 00:42:31 +02:00
|
|
|
DROP ROLE IF EXISTS regress_addr_user;
|
|
|
|
RESET client_min_messages;
|
|
|
|
CREATE USER regress_addr_user;
|
2014-12-23 19:31:29 +01:00
|
|
|
-- Test generic object addressing/identification functions
|
|
|
|
CREATE SCHEMA addr_nsp;
|
|
|
|
SET search_path TO 'addr_nsp';
|
|
|
|
CREATE FOREIGN DATA WRAPPER addr_fdw;
|
|
|
|
CREATE SERVER addr_fserv FOREIGN DATA WRAPPER addr_fdw;
|
|
|
|
CREATE TEXT SEARCH DICTIONARY addr_ts_dict (template=simple);
|
|
|
|
CREATE TEXT SEARCH CONFIGURATION addr_ts_conf (copy=english);
|
|
|
|
CREATE TEXT SEARCH TEMPLATE addr_ts_temp (lexize=dsimple_lexize);
|
|
|
|
CREATE TEXT SEARCH PARSER addr_ts_prs
|
|
|
|
(start = prsd_start, gettoken = prsd_nexttoken, end = prsd_end, lextypes = prsd_lextype);
|
|
|
|
CREATE TABLE addr_nsp.gentable (
|
|
|
|
a serial primary key CONSTRAINT a_chk CHECK (a > 0),
|
|
|
|
b text DEFAULT 'hello');
|
2018-06-26 17:28:41 +02:00
|
|
|
CREATE TABLE addr_nsp.parttable (
|
|
|
|
a int PRIMARY KEY
|
|
|
|
) PARTITION BY RANGE (a);
|
2014-12-23 19:31:29 +01:00
|
|
|
CREATE VIEW addr_nsp.genview AS SELECT * from addr_nsp.gentable;
|
|
|
|
CREATE MATERIALIZED VIEW addr_nsp.genmatview AS SELECT * FROM addr_nsp.gentable;
|
|
|
|
CREATE TYPE addr_nsp.gencomptype AS (a int);
|
|
|
|
CREATE TYPE addr_nsp.genenum AS ENUM ('one', 'two');
|
|
|
|
CREATE FOREIGN TABLE addr_nsp.genftable (a int) SERVER addr_fserv;
|
|
|
|
CREATE AGGREGATE addr_nsp.genaggr(int4) (sfunc = int4pl, stype = int4);
|
|
|
|
CREATE DOMAIN addr_nsp.gendomain AS int4 CONSTRAINT domconstr CHECK (value > 0);
|
|
|
|
CREATE FUNCTION addr_nsp.trig() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$;
|
|
|
|
CREATE TRIGGER t BEFORE INSERT ON addr_nsp.gentable FOR EACH ROW EXECUTE PROCEDURE addr_nsp.trig();
|
|
|
|
CREATE POLICY genpol ON addr_nsp.gentable;
|
2017-11-30 14:46:13 +01:00
|
|
|
CREATE PROCEDURE addr_nsp.proc(int4) LANGUAGE SQL AS $$ $$;
|
2015-03-11 21:01:13 +01:00
|
|
|
CREATE SERVER "integer" FOREIGN DATA WRAPPER addr_fdw;
|
2016-07-18 00:42:31 +02:00
|
|
|
CREATE USER MAPPING FOR regress_addr_user SERVER "integer";
|
|
|
|
ALTER DEFAULT PRIVILEGES FOR ROLE regress_addr_user IN SCHEMA public GRANT ALL ON TABLES TO regress_addr_user;
|
|
|
|
ALTER DEFAULT PRIVILEGES FOR ROLE regress_addr_user REVOKE DELETE ON TABLES FROM regress_addr_user;
|
2019-02-10 03:02:06 +01:00
|
|
|
-- this transform would be quite unsafe to leave lying around,
|
|
|
|
-- except that the SQL language pays no attention to transforms:
|
2015-06-21 21:08:49 +02:00
|
|
|
CREATE TRANSFORM FOR int LANGUAGE SQL (
|
2019-02-10 03:02:06 +01:00
|
|
|
FROM SQL WITH FUNCTION prsd_lextype(internal),
|
2015-06-21 21:08:49 +02:00
|
|
|
TO SQL WITH FUNCTION int4recv(internal));
|
2019-07-13 00:35:34 +02:00
|
|
|
-- suppress warning that depends on wal_level
|
|
|
|
SET client_min_messages = 'ERROR';
|
2017-01-26 19:10:22 +01:00
|
|
|
CREATE PUBLICATION addr_pub FOR TABLE addr_nsp.gentable;
|
Allow publishing the tables of schema.
A new option "FOR ALL TABLES IN SCHEMA" in Create/Alter Publication allows
one or more schemas to be specified, whose tables are selected by the
publisher for sending the data to the subscriber.
The new syntax allows specifying both the tables and schemas. For example:
CREATE PUBLICATION pub1 FOR TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
OR
ALTER PUBLICATION pub1 ADD TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
A new system table "pg_publication_namespace" has been added, to maintain
the schemas that the user wants to publish through the publication.
Modified the output plugin (pgoutput) to publish the changes if the
relation is part of schema publication.
Updates pg_dump to identify and dump schema publications. Updates the \d
family of commands to display schema publications and \dRp+ variant will
now display associated schemas if any.
Author: Vignesh C, Hou Zhijie, Amit Kapila
Syntax-Suggested-by: Tom Lane, Alvaro Herrera
Reviewed-by: Greg Nancarrow, Masahiko Sawada, Hou Zhijie, Amit Kapila, Haiying Tang, Ajin Cherian, Rahila Syed, Bharath Rupireddy, Mark Dilger
Tested-by: Haiying Tang
Discussion: https://www.postgresql.org/message-id/CALDaNm0OANxuJ6RXqwZsM1MSY4s19nuH3734j4a72etDwvBETQ@mail.gmail.com
2021-10-27 04:14:52 +02:00
|
|
|
CREATE PUBLICATION addr_pub_schema FOR ALL TABLES IN SCHEMA addr_nsp;
|
2019-07-13 00:35:34 +02:00
|
|
|
RESET client_min_messages;
|
Fix regression tests to use only global names beginning with "regress_".
In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have on
an existing installation. However, no enforcement mechanism was created,
so it's unsurprising that some new violations have crept in since then.
In fact, a whole new *category* of violations has crept in, to wit we now
also have globally-visible subscription and replication origin names, and
"make installcheck" could very easily clobber user-created objects of
those types. So it's past time to do something about this.
This commit sanitizes the tests enough that they will pass (i.e. not
generate any visible warnings) with the enforcement mechanism I'll add
in the next commit. There are some TAP tests that still trigger the
warnings, but the warnings do not cause test failure. Since these tests
do not actually run against a pre-existing installation, there's no need
to worry whether they could conflict with user-created objects.
The problem with rolenames.sql testing special role names like "user"
is still there, and is dealt with only very cosmetically in this patch
(by hiding the warnings :-(). What we actually need to do to be safe is
to take that test script out of "make installcheck" altogether, but that
seems like material for a separate patch.
Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us
2019-06-29 17:09:03 +02:00
|
|
|
CREATE SUBSCRIPTION regress_addr_sub CONNECTION '' PUBLICATION bar WITH (connect = false, slot_name = NONE);
|
2017-03-23 13:36:36 +01:00
|
|
|
WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
|
Change CREATE STATISTICS syntax
Previously, we had the WITH clause in the middle of the command, where
you'd specify both generic options as well as statistic types. Few
people liked this, so this commit changes it to remove the WITH keyword
from that clause and makes it accept statistic types only. (We
currently don't have any generic options, but if we invent in the
future, we will gain a new WITH clause, probably at the end of the
command).
Also, the column list is now specified without parens, which makes the
whole command look more similar to a SELECT command. This change will
let us expand the command to supporting expressions (not just columns
names) as well as multiple tables and their join conditions.
Tom added lots of code comments and fixed some parts of the CREATE
STATISTICS reference page, too; more changes in this area are
forthcoming. He also fixed a potential problem in the alter_generic
regression test, reducing verbosity on a cascaded drop to avoid
dependency on message ordering, as we do in other tests.
Tom also closed a security bug: we documented that table ownership was
required in order to create a statistics object on it, but didn't
actually implement it.
Implement tab-completion for statistics objects. This can stand some
more improvement.
Authors: Alvaro Herrera, with lots of cleanup by Tom Lane
Discussion: https://postgr.es/m/20170420212426.ltvgyhnefvhixm6i@alvherre.pgsql
2017-05-12 19:59:23 +02:00
|
|
|
CREATE STATISTICS addr_nsp.gentable_stat ON a, b FROM addr_nsp.gentable;
|
2014-12-23 19:31:29 +01:00
|
|
|
-- test some error cases
|
|
|
|
SELECT pg_get_object_address('stone', '{}', '{}');
|
|
|
|
ERROR: unrecognized object type "stone"
|
|
|
|
SELECT pg_get_object_address('table', '{}', '{}');
|
2015-12-11 04:05:27 +01:00
|
|
|
ERROR: name list length must be at least 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('table', '{NULL}', '{}');
|
|
|
|
ERROR: name or argument lists may not contain nulls
|
|
|
|
-- unrecognized object types
|
|
|
|
DO $$
|
|
|
|
DECLARE
|
|
|
|
objtype text;
|
|
|
|
BEGIN
|
|
|
|
FOR objtype IN VALUES ('toast table'), ('index column'), ('sequence column'),
|
2015-03-16 16:06:34 +01:00
|
|
|
('toast table column'), ('view column'), ('materialized view column')
|
2014-12-23 19:31:29 +01:00
|
|
|
LOOP
|
|
|
|
BEGIN
|
|
|
|
PERFORM pg_get_object_address(objtype, '{one}', '{}');
|
|
|
|
EXCEPTION WHEN invalid_parameter_value THEN
|
|
|
|
RAISE WARNING 'error for %: %', objtype, sqlerrm;
|
|
|
|
END;
|
|
|
|
END LOOP;
|
|
|
|
END;
|
|
|
|
$$;
|
|
|
|
WARNING: error for toast table: unsupported object type "toast table"
|
|
|
|
WARNING: error for index column: unsupported object type "index column"
|
|
|
|
WARNING: error for sequence column: unsupported object type "sequence column"
|
|
|
|
WARNING: error for toast table column: unsupported object type "toast table column"
|
|
|
|
WARNING: error for view column: unsupported object type "view column"
|
|
|
|
WARNING: error for materialized view column: unsupported object type "materialized view column"
|
2017-03-16 16:51:08 +01:00
|
|
|
-- miscellaneous other errors
|
|
|
|
select * from pg_get_object_address('operator of access method', '{btree,integer_ops,1}', '{int4,bool}');
|
|
|
|
ERROR: operator 1 (int4, bool) of operator family integer_ops for access method btree does not exist
|
|
|
|
select * from pg_get_object_address('operator of access method', '{btree,integer_ops,99}', '{int4,int4}');
|
|
|
|
ERROR: operator 99 (int4, int4) of operator family integer_ops for access method btree does not exist
|
|
|
|
select * from pg_get_object_address('function of access method', '{btree,integer_ops,1}', '{int4,bool}');
|
|
|
|
ERROR: function 1 (int4, bool) of operator family integer_ops for access method btree does not exist
|
|
|
|
select * from pg_get_object_address('function of access method', '{btree,integer_ops,99}', '{int4,int4}');
|
|
|
|
ERROR: function 99 (int4, int4) of operator family integer_ops for access method btree does not exist
|
2014-12-23 19:31:29 +01:00
|
|
|
DO $$
|
|
|
|
DECLARE
|
|
|
|
objtype text;
|
|
|
|
names text[];
|
|
|
|
args text[];
|
|
|
|
BEGIN
|
|
|
|
FOR objtype IN VALUES
|
|
|
|
('table'), ('index'), ('sequence'), ('view'),
|
|
|
|
('materialized view'), ('foreign table'),
|
|
|
|
('table column'), ('foreign table column'),
|
2017-11-30 14:46:13 +01:00
|
|
|
('aggregate'), ('function'), ('procedure'), ('type'), ('cast'),
|
2014-12-23 19:31:29 +01:00
|
|
|
('table constraint'), ('domain constraint'), ('conversion'), ('default value'),
|
|
|
|
('operator'), ('operator class'), ('operator family'), ('rule'), ('trigger'),
|
|
|
|
('text search parser'), ('text search dictionary'),
|
|
|
|
('text search template'), ('text search configuration'),
|
2015-06-21 21:08:49 +02:00
|
|
|
('policy'), ('user mapping'), ('default acl'), ('transform'),
|
2017-01-26 19:10:22 +01:00
|
|
|
('operator of access method'), ('function of access method'),
|
|
|
|
('publication relation')
|
2014-12-23 19:31:29 +01:00
|
|
|
LOOP
|
|
|
|
FOR names IN VALUES ('{eins}'), ('{addr_nsp, zwei}'), ('{eins, zwei, drei}')
|
|
|
|
LOOP
|
|
|
|
FOR args IN VALUES ('{}'), ('{integer}')
|
|
|
|
LOOP
|
|
|
|
BEGIN
|
|
|
|
PERFORM pg_get_object_address(objtype, names, args);
|
|
|
|
EXCEPTION WHEN OTHERS THEN
|
|
|
|
RAISE WARNING 'error for %,%,%: %', objtype, names, args, sqlerrm;
|
|
|
|
END;
|
|
|
|
END LOOP;
|
|
|
|
END LOOP;
|
|
|
|
END LOOP;
|
|
|
|
END;
|
|
|
|
$$;
|
|
|
|
WARNING: error for table,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for table,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for index,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for index,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for index,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for index,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for index,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for index,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for sequence,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for sequence,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for sequence,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for sequence,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for sequence,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for sequence,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for view,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for view,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for materialized view,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for materialized view,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for materialized view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for materialized view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for materialized view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for materialized view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for foreign table,{eins},{}: relation "eins" does not exist
|
|
|
|
WARNING: error for foreign table,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for foreign table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for foreign table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for foreign table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for foreign table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
|
|
|
WARNING: error for table column,{eins},{}: column name must be qualified
|
|
|
|
WARNING: error for table column,{eins},{integer}: column name must be qualified
|
|
|
|
WARNING: error for table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for table column,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for table column,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
|
|
|
WARNING: error for foreign table column,{eins},{}: column name must be qualified
|
|
|
|
WARNING: error for foreign table column,{eins},{integer}: column name must be qualified
|
|
|
|
WARNING: error for foreign table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for foreign table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for foreign table column,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for foreign table column,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
|
|
|
WARNING: error for aggregate,{eins},{}: aggregate eins(*) does not exist
|
|
|
|
WARNING: error for aggregate,{eins},{integer}: aggregate eins(integer) does not exist
|
|
|
|
WARNING: error for aggregate,{addr_nsp,zwei},{}: aggregate addr_nsp.zwei(*) does not exist
|
|
|
|
WARNING: error for aggregate,{addr_nsp,zwei},{integer}: aggregate addr_nsp.zwei(integer) does not exist
|
|
|
|
WARNING: error for aggregate,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for aggregate,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for function,{eins},{}: function eins() does not exist
|
|
|
|
WARNING: error for function,{eins},{integer}: function eins(integer) does not exist
|
|
|
|
WARNING: error for function,{addr_nsp,zwei},{}: function addr_nsp.zwei() does not exist
|
|
|
|
WARNING: error for function,{addr_nsp,zwei},{integer}: function addr_nsp.zwei(integer) does not exist
|
|
|
|
WARNING: error for function,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for function,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
2017-11-30 14:46:13 +01:00
|
|
|
WARNING: error for procedure,{eins},{}: procedure eins() does not exist
|
|
|
|
WARNING: error for procedure,{eins},{integer}: procedure eins(integer) does not exist
|
|
|
|
WARNING: error for procedure,{addr_nsp,zwei},{}: procedure addr_nsp.zwei() does not exist
|
|
|
|
WARNING: error for procedure,{addr_nsp,zwei},{integer}: procedure addr_nsp.zwei(integer) does not exist
|
|
|
|
WARNING: error for procedure,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for procedure,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
2014-12-23 19:31:29 +01:00
|
|
|
WARNING: error for type,{eins},{}: type "eins" does not exist
|
|
|
|
WARNING: error for type,{eins},{integer}: type "eins" does not exist
|
|
|
|
WARNING: error for type,{addr_nsp,zwei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for type,{addr_nsp,zwei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for type,{eins,zwei,drei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for type,{eins,zwei,drei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for cast,{eins},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for cast,{eins},{integer}: type "eins" does not exist
|
|
|
|
WARNING: error for cast,{addr_nsp,zwei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for cast,{addr_nsp,zwei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for cast,{eins,zwei,drei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for cast,{eins,zwei,drei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for table constraint,{eins},{}: must specify relation and object name
|
|
|
|
WARNING: error for table constraint,{eins},{integer}: must specify relation and object name
|
|
|
|
WARNING: error for table constraint,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for table constraint,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for table constraint,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for table constraint,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
2014-12-30 19:04:21 +01:00
|
|
|
WARNING: error for domain constraint,{eins},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for domain constraint,{eins},{integer}: type "eins" does not exist
|
|
|
|
WARNING: error for domain constraint,{addr_nsp,zwei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for domain constraint,{addr_nsp,zwei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for domain constraint,{eins,zwei,drei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for domain constraint,{eins,zwei,drei},{integer}: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
WARNING: error for conversion,{eins},{}: conversion "eins" does not exist
|
|
|
|
WARNING: error for conversion,{eins},{integer}: conversion "eins" does not exist
|
|
|
|
WARNING: error for conversion,{addr_nsp,zwei},{}: conversion "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for conversion,{addr_nsp,zwei},{integer}: conversion "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for conversion,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for conversion,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for default value,{eins},{}: column name must be qualified
|
|
|
|
WARNING: error for default value,{eins},{integer}: column name must be qualified
|
|
|
|
WARNING: error for default value,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for default value,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for default value,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for default value,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
|
|
|
WARNING: error for operator,{eins},{}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator,{eins},{integer}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator,{addr_nsp,zwei},{}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator,{addr_nsp,zwei},{integer}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator,{eins,zwei,drei},{}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator,{eins,zwei,drei},{integer}: argument list length must be exactly 2
|
2015-03-16 16:06:34 +01:00
|
|
|
WARNING: error for operator class,{eins},{}: name list length must be at least 2
|
|
|
|
WARNING: error for operator class,{eins},{integer}: name list length must be at least 2
|
|
|
|
WARNING: error for operator class,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist
|
|
|
|
WARNING: error for operator class,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist
|
|
|
|
WARNING: error for operator class,{eins,zwei,drei},{}: access method "eins" does not exist
|
|
|
|
WARNING: error for operator class,{eins,zwei,drei},{integer}: access method "eins" does not exist
|
|
|
|
WARNING: error for operator family,{eins},{}: name list length must be at least 2
|
|
|
|
WARNING: error for operator family,{eins},{integer}: name list length must be at least 2
|
|
|
|
WARNING: error for operator family,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist
|
|
|
|
WARNING: error for operator family,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist
|
|
|
|
WARNING: error for operator family,{eins,zwei,drei},{}: access method "eins" does not exist
|
|
|
|
WARNING: error for operator family,{eins,zwei,drei},{integer}: access method "eins" does not exist
|
2017-02-22 14:45:14 +01:00
|
|
|
WARNING: error for rule,{eins},{}: must specify relation and object name
|
|
|
|
WARNING: error for rule,{eins},{integer}: must specify relation and object name
|
2014-12-23 19:31:29 +01:00
|
|
|
WARNING: error for rule,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for rule,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for rule,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for rule,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
|
|
|
WARNING: error for trigger,{eins},{}: must specify relation and object name
|
|
|
|
WARNING: error for trigger,{eins},{integer}: must specify relation and object name
|
|
|
|
WARNING: error for trigger,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for trigger,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for trigger,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for trigger,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
|
|
|
WARNING: error for text search parser,{eins},{}: text search parser "eins" does not exist
|
|
|
|
WARNING: error for text search parser,{eins},{integer}: text search parser "eins" does not exist
|
|
|
|
WARNING: error for text search parser,{addr_nsp,zwei},{}: text search parser "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search parser,{addr_nsp,zwei},{integer}: text search parser "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search parser,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search parser,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search dictionary,{eins},{}: text search dictionary "eins" does not exist
|
|
|
|
WARNING: error for text search dictionary,{eins},{integer}: text search dictionary "eins" does not exist
|
|
|
|
WARNING: error for text search dictionary,{addr_nsp,zwei},{}: text search dictionary "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search dictionary,{addr_nsp,zwei},{integer}: text search dictionary "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search dictionary,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search dictionary,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search template,{eins},{}: text search template "eins" does not exist
|
|
|
|
WARNING: error for text search template,{eins},{integer}: text search template "eins" does not exist
|
|
|
|
WARNING: error for text search template,{addr_nsp,zwei},{}: text search template "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search template,{addr_nsp,zwei},{integer}: text search template "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search template,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search template,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search configuration,{eins},{}: text search configuration "eins" does not exist
|
|
|
|
WARNING: error for text search configuration,{eins},{integer}: text search configuration "eins" does not exist
|
|
|
|
WARNING: error for text search configuration,{addr_nsp,zwei},{}: text search configuration "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search configuration,{addr_nsp,zwei},{integer}: text search configuration "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for text search configuration,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for text search configuration,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei
|
|
|
|
WARNING: error for policy,{eins},{}: must specify relation and object name
|
|
|
|
WARNING: error for policy,{eins},{integer}: must specify relation and object name
|
|
|
|
WARNING: error for policy,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for policy,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist
|
|
|
|
WARNING: error for policy,{eins,zwei,drei},{}: schema "eins" does not exist
|
|
|
|
WARNING: error for policy,{eins,zwei,drei},{integer}: schema "eins" does not exist
|
2015-03-11 21:01:13 +01:00
|
|
|
WARNING: error for user mapping,{eins},{}: argument list length must be exactly 1
|
2015-11-17 03:16:42 +01:00
|
|
|
WARNING: error for user mapping,{eins},{integer}: user mapping for user "eins" on server "integer" does not exist
|
2015-03-11 21:01:13 +01:00
|
|
|
WARNING: error for user mapping,{addr_nsp,zwei},{}: argument list length must be exactly 1
|
2015-11-17 03:16:42 +01:00
|
|
|
WARNING: error for user mapping,{addr_nsp,zwei},{integer}: user mapping for user "addr_nsp" on server "integer" does not exist
|
2015-03-11 21:01:13 +01:00
|
|
|
WARNING: error for user mapping,{eins,zwei,drei},{}: argument list length must be exactly 1
|
2015-11-17 03:16:42 +01:00
|
|
|
WARNING: error for user mapping,{eins,zwei,drei},{integer}: user mapping for user "eins" on server "integer" does not exist
|
2015-03-11 23:23:47 +01:00
|
|
|
WARNING: error for default acl,{eins},{}: argument list length must be exactly 1
|
2017-06-14 20:44:24 +02:00
|
|
|
WARNING: error for default acl,{eins},{integer}: unrecognized default ACL object type "i"
|
2015-03-11 23:23:47 +01:00
|
|
|
WARNING: error for default acl,{addr_nsp,zwei},{}: argument list length must be exactly 1
|
2017-06-14 20:44:24 +02:00
|
|
|
WARNING: error for default acl,{addr_nsp,zwei},{integer}: unrecognized default ACL object type "i"
|
2015-03-11 23:23:47 +01:00
|
|
|
WARNING: error for default acl,{eins,zwei,drei},{}: argument list length must be exactly 1
|
2017-06-14 20:44:24 +02:00
|
|
|
WARNING: error for default acl,{eins,zwei,drei},{integer}: unrecognized default ACL object type "i"
|
2015-06-21 21:08:49 +02:00
|
|
|
WARNING: error for transform,{eins},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for transform,{eins},{integer}: type "eins" does not exist
|
|
|
|
WARNING: error for transform,{addr_nsp,zwei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for transform,{addr_nsp,zwei},{integer}: name list length must be exactly 1
|
|
|
|
WARNING: error for transform,{eins,zwei,drei},{}: name list length must be exactly 1
|
|
|
|
WARNING: error for transform,{eins,zwei,drei},{integer}: name list length must be exactly 1
|
2015-03-16 16:06:34 +01:00
|
|
|
WARNING: error for operator of access method,{eins},{}: name list length must be at least 3
|
|
|
|
WARNING: error for operator of access method,{eins},{integer}: name list length must be at least 3
|
|
|
|
WARNING: error for operator of access method,{addr_nsp,zwei},{}: name list length must be at least 3
|
|
|
|
WARNING: error for operator of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3
|
|
|
|
WARNING: error for operator of access method,{eins,zwei,drei},{}: argument list length must be exactly 2
|
|
|
|
WARNING: error for operator of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2
|
|
|
|
WARNING: error for function of access method,{eins},{}: name list length must be at least 3
|
|
|
|
WARNING: error for function of access method,{eins},{integer}: name list length must be at least 3
|
|
|
|
WARNING: error for function of access method,{addr_nsp,zwei},{}: name list length must be at least 3
|
|
|
|
WARNING: error for function of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3
|
|
|
|
WARNING: error for function of access method,{eins,zwei,drei},{}: argument list length must be exactly 2
|
|
|
|
WARNING: error for function of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2
|
2017-01-26 19:10:22 +01:00
|
|
|
WARNING: error for publication relation,{eins},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for publication relation,{eins},{integer}: relation "eins" does not exist
|
|
|
|
WARNING: error for publication relation,{addr_nsp,zwei},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for publication relation,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist
|
|
|
|
WARNING: error for publication relation,{eins,zwei,drei},{}: argument list length must be exactly 1
|
|
|
|
WARNING: error for publication relation,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei"
|
2014-12-23 19:31:29 +01:00
|
|
|
-- these object types cannot be qualified names
|
|
|
|
SELECT pg_get_object_address('language', '{one}', '{}');
|
|
|
|
ERROR: language "one" does not exist
|
|
|
|
SELECT pg_get_object_address('language', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('large object', '{123}', '{}');
|
|
|
|
ERROR: large object 123 does not exist
|
|
|
|
SELECT pg_get_object_address('large object', '{123,456}', '{}');
|
|
|
|
ERROR: name list length must be exactly 1
|
|
|
|
SELECT pg_get_object_address('large object', '{blargh}', '{}');
|
|
|
|
ERROR: invalid input syntax for type oid: "blargh"
|
|
|
|
SELECT pg_get_object_address('schema', '{one}', '{}');
|
|
|
|
ERROR: schema "one" does not exist
|
|
|
|
SELECT pg_get_object_address('schema', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('role', '{one}', '{}');
|
|
|
|
ERROR: role "one" does not exist
|
|
|
|
SELECT pg_get_object_address('role', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('database', '{one}', '{}');
|
|
|
|
ERROR: database "one" does not exist
|
|
|
|
SELECT pg_get_object_address('database', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('tablespace', '{one}', '{}');
|
|
|
|
ERROR: tablespace "one" does not exist
|
|
|
|
SELECT pg_get_object_address('tablespace', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('foreign-data wrapper', '{one}', '{}');
|
|
|
|
ERROR: foreign-data wrapper "one" does not exist
|
|
|
|
SELECT pg_get_object_address('foreign-data wrapper', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('server', '{one}', '{}');
|
|
|
|
ERROR: server "one" does not exist
|
|
|
|
SELECT pg_get_object_address('server', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('extension', '{one}', '{}');
|
|
|
|
ERROR: extension "one" does not exist
|
|
|
|
SELECT pg_get_object_address('extension', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
SELECT pg_get_object_address('event trigger', '{one}', '{}');
|
|
|
|
ERROR: event trigger "one" does not exist
|
|
|
|
SELECT pg_get_object_address('event trigger', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2016-03-24 03:01:35 +01:00
|
|
|
SELECT pg_get_object_address('access method', '{one}', '{}');
|
|
|
|
ERROR: access method "one" does not exist
|
|
|
|
SELECT pg_get_object_address('access method', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2017-01-26 19:10:22 +01:00
|
|
|
SELECT pg_get_object_address('publication', '{one}', '{}');
|
|
|
|
ERROR: publication "one" does not exist
|
|
|
|
SELECT pg_get_object_address('publication', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2017-01-26 19:10:22 +01:00
|
|
|
SELECT pg_get_object_address('subscription', '{one}', '{}');
|
|
|
|
ERROR: subscription "one" does not exist
|
|
|
|
SELECT pg_get_object_address('subscription', '{one,two}', '{}');
|
Remove objname/objargs split for referring to objects
In simpler times, it might have worked to refer to all kinds of objects
by a list of name components and an optional argument list. But this
doesn't work for all objects, which has resulted in a collection of
hacks to place various other nodes types into these fields, which have
to be unpacked at the other end. This makes it also weird to represent
lists of such things in the grammar, because they would have to be lists
of singleton lists, to make the unpacking work consistently. The other
problem is that keeping separate name and args fields makes it awkward
to deal with lists of functions.
Change that by dropping the objargs field and have objname, renamed to
object, be a generic Node, which can then be flexibly assigned and
managed using the normal Node mechanisms. In many cases it will still
be a List of names, in some cases it will be a string Value, for types
it will be the existing Typename, for functions it will now use the
existing ObjectWithArgs node type. Some of the more obscure object
types still use somewhat arbitrary nested lists.
Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2016-11-12 18:00:00 +01:00
|
|
|
ERROR: name list length must be exactly 1
|
2014-12-23 19:31:29 +01:00
|
|
|
-- test successful cases
|
|
|
|
WITH objects (type, name, args) AS (VALUES
|
|
|
|
('table', '{addr_nsp, gentable}'::text[], '{}'::text[]),
|
2018-06-26 17:28:41 +02:00
|
|
|
('table', '{addr_nsp, parttable}'::text[], '{}'::text[]),
|
2014-12-23 19:31:29 +01:00
|
|
|
('index', '{addr_nsp, gentable_pkey}', '{}'),
|
2018-06-26 17:28:41 +02:00
|
|
|
('index', '{addr_nsp, parttable_pkey}', '{}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
('sequence', '{addr_nsp, gentable_a_seq}', '{}'),
|
|
|
|
-- 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}'),
|
2017-11-30 14:46:13 +01:00
|
|
|
('procedure', '{addr_nsp, proc}', '{int4}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
('type', '{pg_catalog._int4}', '{}'),
|
|
|
|
('type', '{addr_nsp.gendomain}', '{}'),
|
|
|
|
('type', '{addr_nsp.gencomptype}', '{}'),
|
|
|
|
('type', '{addr_nsp.genenum}', '{}'),
|
|
|
|
('cast', '{int8}', '{int4}'),
|
|
|
|
('collation', '{default}', '{}'),
|
|
|
|
('table constraint', '{addr_nsp, gentable, a_chk}', '{}'),
|
2014-12-30 19:04:21 +01:00
|
|
|
('domain constraint', '{addr_nsp.gendomain}', '{domconstr}'),
|
2019-07-05 20:17:27 +02:00
|
|
|
('conversion', '{pg_catalog, koi8_r_to_mic}', '{}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
('default value', '{addr_nsp, gentable, b}', '{}'),
|
|
|
|
('language', '{plpgsql}', '{}'),
|
|
|
|
-- large object
|
|
|
|
('operator', '{+}', '{int4, int4}'),
|
2015-03-16 16:06:34 +01:00
|
|
|
('operator class', '{btree, int4_ops}', '{}'),
|
|
|
|
('operator family', '{btree, integer_ops}', '{}'),
|
|
|
|
('operator of access method', '{btree,integer_ops,1}', '{integer,integer}'),
|
|
|
|
('function of access method', '{btree,integer_ops,2}', '{integer,integer}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
('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}', '{}'),
|
|
|
|
('text search template', '{addr_ts_temp}', '{}'),
|
|
|
|
('text search configuration', '{addr_ts_conf}', '{}'),
|
2016-07-18 00:42:31 +02:00
|
|
|
('role', '{regress_addr_user}', '{}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
-- database
|
|
|
|
-- tablespace
|
|
|
|
('foreign-data wrapper', '{addr_fdw}', '{}'),
|
|
|
|
('server', '{addr_fserv}', '{}'),
|
2016-07-18 00:42:31 +02:00
|
|
|
('user mapping', '{regress_addr_user}', '{integer}'),
|
|
|
|
('default acl', '{regress_addr_user,public}', '{r}'),
|
|
|
|
('default acl', '{regress_addr_user}', '{r}'),
|
2014-12-23 19:31:29 +01:00
|
|
|
-- extension
|
2014-12-26 18:18:09 +01:00
|
|
|
-- event trigger
|
2015-06-21 21:08:49 +02:00
|
|
|
('policy', '{addr_nsp, gentable, genpol}', '{}'),
|
2016-03-24 03:01:35 +01:00
|
|
|
('transform', '{int}', '{sql}'),
|
2017-01-26 19:10:22 +01:00
|
|
|
('access method', '{btree}', '{}'),
|
|
|
|
('publication', '{addr_pub}', '{}'),
|
Allow publishing the tables of schema.
A new option "FOR ALL TABLES IN SCHEMA" in Create/Alter Publication allows
one or more schemas to be specified, whose tables are selected by the
publisher for sending the data to the subscriber.
The new syntax allows specifying both the tables and schemas. For example:
CREATE PUBLICATION pub1 FOR TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
OR
ALTER PUBLICATION pub1 ADD TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
A new system table "pg_publication_namespace" has been added, to maintain
the schemas that the user wants to publish through the publication.
Modified the output plugin (pgoutput) to publish the changes if the
relation is part of schema publication.
Updates pg_dump to identify and dump schema publications. Updates the \d
family of commands to display schema publications and \dRp+ variant will
now display associated schemas if any.
Author: Vignesh C, Hou Zhijie, Amit Kapila
Syntax-Suggested-by: Tom Lane, Alvaro Herrera
Reviewed-by: Greg Nancarrow, Masahiko Sawada, Hou Zhijie, Amit Kapila, Haiying Tang, Ajin Cherian, Rahila Syed, Bharath Rupireddy, Mark Dilger
Tested-by: Haiying Tang
Discussion: https://www.postgresql.org/message-id/CALDaNm0OANxuJ6RXqwZsM1MSY4s19nuH3734j4a72etDwvBETQ@mail.gmail.com
2021-10-27 04:14:52 +02:00
|
|
|
('publication namespace', '{addr_nsp}', '{addr_pub_schema}'),
|
2017-01-26 19:10:22 +01:00
|
|
|
('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
|
Fix regression tests to use only global names beginning with "regress_".
In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have on
an existing installation. However, no enforcement mechanism was created,
so it's unsurprising that some new violations have crept in since then.
In fact, a whole new *category* of violations has crept in, to wit we now
also have globally-visible subscription and replication origin names, and
"make installcheck" could very easily clobber user-created objects of
those types. So it's past time to do something about this.
This commit sanitizes the tests enough that they will pass (i.e. not
generate any visible warnings) with the enforcement mechanism I'll add
in the next commit. There are some TAP tests that still trigger the
warnings, but the warnings do not cause test failure. Since these tests
do not actually run against a pre-existing installation, there's no need
to worry whether they could conflict with user-created objects.
The problem with rolenames.sql testing special role names like "user"
is still there, and is dealt with only very cosmetically in this patch
(by hiding the warnings :-(). What we actually need to do to be safe is
to take that test script out of "make installcheck" altogether, but that
seems like material for a separate patch.
Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us
2019-06-29 17:09:03 +02:00
|
|
|
('subscription', '{regress_addr_sub}', '{}'),
|
2017-05-14 16:54:47 +02:00
|
|
|
('statistics object', '{addr_nsp, gentable_stat}', '{}')
|
2014-12-23 19:31:29 +01:00
|
|
|
)
|
2017-03-01 18:22:33 +01:00
|
|
|
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,
|
2014-12-30 19:41:50 +01:00
|
|
|
-- test roundtrip through pg_identify_object_as_address
|
2017-03-01 18:22:33 +01:00
|
|
|
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)) =
|
|
|
|
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.objsubid))
|
2014-12-30 19:41:50 +01:00
|
|
|
FROM objects, pg_get_object_address(type, name, args) addr1,
|
2017-03-01 18:22:33 +01:00
|
|
|
pg_identify_object_as_address(classid, objid, objsubid) ioa(typ,nms,args),
|
2014-12-30 19:41:50 +01:00
|
|
|
pg_get_object_address(typ, nms, ioa.args) as addr2
|
2017-03-01 18:22:33 +01:00
|
|
|
ORDER BY addr1.classid, addr1.objid, addr1.objsubid;
|
2014-12-30 19:41:50 +01:00
|
|
|
type | schema | name | identity | ?column?
|
|
|
|
---------------------------+------------+-------------------+----------------------------------------------------------------------+----------
|
2016-07-18 00:42:31 +02:00
|
|
|
default acl | | | for role regress_addr_user in schema public on tables | t
|
|
|
|
default acl | | | for role regress_addr_user on tables | t
|
2014-12-30 19:41:50 +01:00
|
|
|
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
|
2017-11-30 14:46:13 +01:00
|
|
|
procedure | addr_nsp | | addr_nsp.proc(integer) | t
|
2014-12-30 19:41:50 +01:00
|
|
|
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
|
2018-06-26 17:28:41 +02:00
|
|
|
table | addr_nsp | parttable | addr_nsp.parttable | t
|
|
|
|
index | addr_nsp | parttable_pkey | addr_nsp.parttable_pkey | t
|
2014-12-30 19:41:50 +01:00
|
|
|
view | addr_nsp | genview | addr_nsp.genview | t
|
|
|
|
materialized view | addr_nsp | genmatview | addr_nsp.genmatview | t
|
|
|
|
foreign table | addr_nsp | genftable | addr_nsp.genftable | t
|
2015-03-16 16:06:34 +01:00
|
|
|
foreign table column | addr_nsp | genftable | addr_nsp.genftable.a | t
|
2016-07-18 00:42:31 +02:00
|
|
|
role | | regress_addr_user | regress_addr_user | t
|
2014-12-30 19:41:50 +01:00
|
|
|
server | | addr_fserv | addr_fserv | t
|
2016-07-18 00:42:31 +02:00
|
|
|
user mapping | | | regress_addr_user on server integer | t
|
2014-12-30 19:41:50 +01:00
|
|
|
foreign-data wrapper | | addr_fdw | addr_fdw | t
|
2016-03-24 03:01:35 +01:00
|
|
|
access method | | btree | btree | t
|
2015-03-16 16:06:34 +01:00
|
|
|
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
|
2014-12-30 19:41:50 +01:00
|
|
|
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
|
2019-07-05 20:17:27 +02:00
|
|
|
conversion | pg_catalog | koi8_r_to_mic | pg_catalog.koi8_r_to_mic | t
|
2014-12-30 19:41:50 +01:00
|
|
|
language | | plpgsql | plpgsql | t
|
|
|
|
schema | | addr_nsp | addr_nsp | t
|
2015-02-18 18:44:27 +01:00
|
|
|
operator class | pg_catalog | int4_ops | pg_catalog.int4_ops USING btree | t
|
2014-12-30 19:41:50 +01:00
|
|
|
operator | pg_catalog | | pg_catalog.+(integer,integer) | t
|
|
|
|
rule | | | "_RETURN" on addr_nsp.genview | t
|
|
|
|
trigger | | | t on addr_nsp.gentable | t
|
2015-02-18 18:44:27 +01:00
|
|
|
operator family | pg_catalog | integer_ops | pg_catalog.integer_ops USING btree | t
|
2014-12-30 19:41:50 +01:00
|
|
|
policy | | | genpol on addr_nsp.gentable | t
|
2017-05-14 16:54:47 +02:00
|
|
|
statistics object | addr_nsp | gentable_stat | addr_nsp.gentable_stat | t
|
2014-12-30 19:41:50 +01:00
|
|
|
collation | pg_catalog | "default" | pg_catalog."default" | t
|
2015-06-21 21:08:49 +02:00
|
|
|
transform | | | for integer on language sql | t
|
2014-12-30 19:41:50 +01:00
|
|
|
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
|
Fix regression tests to use only global names beginning with "regress_".
In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have on
an existing installation. However, no enforcement mechanism was created,
so it's unsurprising that some new violations have crept in since then.
In fact, a whole new *category* of violations has crept in, to wit we now
also have globally-visible subscription and replication origin names, and
"make installcheck" could very easily clobber user-created objects of
those types. So it's past time to do something about this.
This commit sanitizes the tests enough that they will pass (i.e. not
generate any visible warnings) with the enforcement mechanism I'll add
in the next commit. There are some TAP tests that still trigger the
warnings, but the warnings do not cause test failure. Since these tests
do not actually run against a pre-existing installation, there's no need
to worry whether they could conflict with user-created objects.
The problem with rolenames.sql testing special role names like "user"
is still there, and is dealt with only very cosmetically in this patch
(by hiding the warnings :-(). What we actually need to do to be safe is
to take that test script out of "make installcheck" altogether, but that
seems like material for a separate patch.
Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us
2019-06-29 17:09:03 +02:00
|
|
|
subscription | | regress_addr_sub | regress_addr_sub | t
|
2017-01-26 19:10:22 +01:00
|
|
|
publication | | addr_pub | addr_pub | t
|
2018-05-24 18:38:55 +02:00
|
|
|
publication relation | | | addr_nsp.gentable in publication addr_pub | t
|
Allow publishing the tables of schema.
A new option "FOR ALL TABLES IN SCHEMA" in Create/Alter Publication allows
one or more schemas to be specified, whose tables are selected by the
publisher for sending the data to the subscriber.
The new syntax allows specifying both the tables and schemas. For example:
CREATE PUBLICATION pub1 FOR TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
OR
ALTER PUBLICATION pub1 ADD TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
A new system table "pg_publication_namespace" has been added, to maintain
the schemas that the user wants to publish through the publication.
Modified the output plugin (pgoutput) to publish the changes if the
relation is part of schema publication.
Updates pg_dump to identify and dump schema publications. Updates the \d
family of commands to display schema publications and \dRp+ variant will
now display associated schemas if any.
Author: Vignesh C, Hou Zhijie, Amit Kapila
Syntax-Suggested-by: Tom Lane, Alvaro Herrera
Reviewed-by: Greg Nancarrow, Masahiko Sawada, Hou Zhijie, Amit Kapila, Haiying Tang, Ajin Cherian, Rahila Syed, Bharath Rupireddy, Mark Dilger
Tested-by: Haiying Tang
Discussion: https://www.postgresql.org/message-id/CALDaNm0OANxuJ6RXqwZsM1MSY4s19nuH3734j4a72etDwvBETQ@mail.gmail.com
2021-10-27 04:14:52 +02:00
|
|
|
publication namespace | | | addr_nsp in publication addr_pub_schema | t
|
|
|
|
(50 rows)
|
2014-12-23 19:31:29 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
--- Cleanup resources
|
|
|
|
---
|
|
|
|
DROP FOREIGN DATA WRAPPER addr_fdw CASCADE;
|
2017-08-01 22:49:23 +02:00
|
|
|
NOTICE: drop cascades to 4 other objects
|
2019-03-25 00:15:37 +01:00
|
|
|
DETAIL: drop cascades to server addr_fserv
|
|
|
|
drop cascades to foreign table genftable
|
|
|
|
drop cascades to server integer
|
|
|
|
drop cascades to user mapping for regress_addr_user on server integer
|
2017-01-26 19:10:22 +01:00
|
|
|
DROP PUBLICATION addr_pub;
|
Allow publishing the tables of schema.
A new option "FOR ALL TABLES IN SCHEMA" in Create/Alter Publication allows
one or more schemas to be specified, whose tables are selected by the
publisher for sending the data to the subscriber.
The new syntax allows specifying both the tables and schemas. For example:
CREATE PUBLICATION pub1 FOR TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
OR
ALTER PUBLICATION pub1 ADD TABLE t1,t2,t3, ALL TABLES IN SCHEMA s1,s2;
A new system table "pg_publication_namespace" has been added, to maintain
the schemas that the user wants to publish through the publication.
Modified the output plugin (pgoutput) to publish the changes if the
relation is part of schema publication.
Updates pg_dump to identify and dump schema publications. Updates the \d
family of commands to display schema publications and \dRp+ variant will
now display associated schemas if any.
Author: Vignesh C, Hou Zhijie, Amit Kapila
Syntax-Suggested-by: Tom Lane, Alvaro Herrera
Reviewed-by: Greg Nancarrow, Masahiko Sawada, Hou Zhijie, Amit Kapila, Haiying Tang, Ajin Cherian, Rahila Syed, Bharath Rupireddy, Mark Dilger
Tested-by: Haiying Tang
Discussion: https://www.postgresql.org/message-id/CALDaNm0OANxuJ6RXqwZsM1MSY4s19nuH3734j4a72etDwvBETQ@mail.gmail.com
2021-10-27 04:14:52 +02:00
|
|
|
DROP PUBLICATION addr_pub_schema;
|
Fix regression tests to use only global names beginning with "regress_".
In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have on
an existing installation. However, no enforcement mechanism was created,
so it's unsurprising that some new violations have crept in since then.
In fact, a whole new *category* of violations has crept in, to wit we now
also have globally-visible subscription and replication origin names, and
"make installcheck" could very easily clobber user-created objects of
those types. So it's past time to do something about this.
This commit sanitizes the tests enough that they will pass (i.e. not
generate any visible warnings) with the enforcement mechanism I'll add
in the next commit. There are some TAP tests that still trigger the
warnings, but the warnings do not cause test failure. Since these tests
do not actually run against a pre-existing installation, there's no need
to worry whether they could conflict with user-created objects.
The problem with rolenames.sql testing special role names like "user"
is still there, and is dealt with only very cosmetically in this patch
(by hiding the warnings :-(). What we actually need to do to be safe is
to take that test script out of "make installcheck" altogether, but that
seems like material for a separate patch.
Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us
2019-06-29 17:09:03 +02:00
|
|
|
DROP SUBSCRIPTION regress_addr_sub;
|
2014-12-23 19:31:29 +01:00
|
|
|
DROP SCHEMA addr_nsp CASCADE;
|
2018-06-26 17:28:41 +02:00
|
|
|
NOTICE: drop cascades to 14 other objects
|
2019-03-25 00:15:37 +01:00
|
|
|
DETAIL: drop cascades to text search dictionary addr_ts_dict
|
|
|
|
drop cascades to text search configuration addr_ts_conf
|
|
|
|
drop cascades to text search template addr_ts_temp
|
|
|
|
drop cascades to text search parser addr_ts_prs
|
|
|
|
drop cascades to table gentable
|
|
|
|
drop cascades to table parttable
|
|
|
|
drop cascades to view genview
|
|
|
|
drop cascades to materialized view genmatview
|
|
|
|
drop cascades to type gencomptype
|
|
|
|
drop cascades to type genenum
|
|
|
|
drop cascades to function genaggr(integer)
|
|
|
|
drop cascades to type gendomain
|
|
|
|
drop cascades to function trig()
|
|
|
|
drop cascades to function proc(integer)
|
2016-07-18 00:42:31 +02:00
|
|
|
DROP OWNED BY regress_addr_user;
|
|
|
|
DROP USER regress_addr_user;
|
2020-07-15 02:03:10 +02:00
|
|
|
--
|
|
|
|
-- Checks for invalid objects
|
|
|
|
--
|
|
|
|
-- Make sure that NULL handling is correct.
|
|
|
|
\pset null 'NULL'
|
|
|
|
-- Temporarily disable fancy output, so as future additions never create
|
|
|
|
-- a large amount of diffs.
|
|
|
|
\a\t
|
|
|
|
-- Keep this list in the same order as getObjectIdentityParts()
|
|
|
|
-- in objectaddress.c.
|
|
|
|
WITH objects (classid, objid, objsubid) AS (VALUES
|
|
|
|
('pg_class'::regclass, 0, 0), -- no relation
|
|
|
|
('pg_class'::regclass, 'pg_class'::regclass, 100), -- no column for relation
|
|
|
|
('pg_proc'::regclass, 0, 0), -- no function
|
|
|
|
('pg_type'::regclass, 0, 0), -- no type
|
|
|
|
('pg_cast'::regclass, 0, 0), -- no cast
|
|
|
|
('pg_collation'::regclass, 0, 0), -- no collation
|
|
|
|
('pg_constraint'::regclass, 0, 0), -- no constraint
|
|
|
|
('pg_conversion'::regclass, 0, 0), -- no conversion
|
|
|
|
('pg_attrdef'::regclass, 0, 0), -- no default attribute
|
|
|
|
('pg_language'::regclass, 0, 0), -- no language
|
|
|
|
('pg_largeobject'::regclass, 0, 0), -- no large object, no error
|
|
|
|
('pg_operator'::regclass, 0, 0), -- no operator
|
|
|
|
('pg_opclass'::regclass, 0, 0), -- no opclass, no need to check for no access method
|
|
|
|
('pg_opfamily'::regclass, 0, 0), -- no opfamily
|
|
|
|
('pg_am'::regclass, 0, 0), -- no access method
|
|
|
|
('pg_amop'::regclass, 0, 0), -- no AM operator
|
|
|
|
('pg_amproc'::regclass, 0, 0), -- no AM proc
|
|
|
|
('pg_rewrite'::regclass, 0, 0), -- no rewrite
|
|
|
|
('pg_trigger'::regclass, 0, 0), -- no trigger
|
|
|
|
('pg_namespace'::regclass, 0, 0), -- no schema
|
|
|
|
('pg_statistic_ext'::regclass, 0, 0), -- no statistics
|
|
|
|
('pg_ts_parser'::regclass, 0, 0), -- no TS parser
|
|
|
|
('pg_ts_dict'::regclass, 0, 0), -- no TS dictionnary
|
|
|
|
('pg_ts_template'::regclass, 0, 0), -- no TS template
|
|
|
|
('pg_ts_config'::regclass, 0, 0), -- no TS configuration
|
|
|
|
('pg_authid'::regclass, 0, 0), -- no role
|
|
|
|
('pg_database'::regclass, 0, 0), -- no database
|
|
|
|
('pg_tablespace'::regclass, 0, 0), -- no tablespace
|
|
|
|
('pg_foreign_data_wrapper'::regclass, 0, 0), -- no FDW
|
|
|
|
('pg_foreign_server'::regclass, 0, 0), -- no server
|
|
|
|
('pg_user_mapping'::regclass, 0, 0), -- no user mapping
|
|
|
|
('pg_default_acl'::regclass, 0, 0), -- no default ACL
|
|
|
|
('pg_extension'::regclass, 0, 0), -- no extension
|
|
|
|
('pg_event_trigger'::regclass, 0, 0), -- no event trigger
|
|
|
|
('pg_policy'::regclass, 0, 0), -- no policy
|
|
|
|
('pg_publication'::regclass, 0, 0), -- no publication
|
|
|
|
('pg_publication_rel'::regclass, 0, 0), -- no publication relation
|
|
|
|
('pg_subscription'::regclass, 0, 0), -- no subscription
|
|
|
|
('pg_transform'::regclass, 0, 0) -- no transformation
|
|
|
|
)
|
|
|
|
SELECT ROW(pg_identify_object(objects.classid, objects.objid, objects.objsubid))
|
|
|
|
AS ident,
|
|
|
|
ROW(pg_identify_object_as_address(objects.classid, objects.objid, objects.objsubid))
|
|
|
|
AS addr,
|
|
|
|
pg_describe_object(objects.classid, objects.objid, objects.objsubid)
|
|
|
|
AS descr
|
|
|
|
FROM objects
|
|
|
|
ORDER BY objects.classid, objects.objid, objects.objsubid;
|
|
|
|
("(""default acl"",,,)")|("(""default acl"",,)")|NULL
|
|
|
|
("(tablespace,,,)")|("(tablespace,,)")|NULL
|
|
|
|
("(type,,,)")|("(type,,)")|NULL
|
|
|
|
("(routine,,,)")|("(routine,,)")|NULL
|
|
|
|
("(relation,,,)")|("(relation,,)")|NULL
|
|
|
|
("(""table column"",,,)")|("(""table column"",,)")|NULL
|
|
|
|
("(role,,,)")|("(role,,)")|NULL
|
|
|
|
("(database,,,)")|("(database,,)")|NULL
|
|
|
|
("(server,,,)")|("(server,,)")|NULL
|
|
|
|
("(""user mapping"",,,)")|("(""user mapping"",,)")|NULL
|
|
|
|
("(""foreign-data wrapper"",,,)")|("(""foreign-data wrapper"",,)")|NULL
|
|
|
|
("(""access method"",,,)")|("(""access method"",,)")|NULL
|
|
|
|
("(""operator of access method"",,,)")|("(""operator of access method"",,)")|NULL
|
|
|
|
("(""function of access method"",,,)")|("(""function of access method"",,)")|NULL
|
|
|
|
("(""default value"",,,)")|("(""default value"",,)")|NULL
|
|
|
|
("(cast,,,)")|("(cast,,)")|NULL
|
|
|
|
("(constraint,,,)")|("(constraint,,)")|NULL
|
|
|
|
("(conversion,,,)")|("(conversion,,)")|NULL
|
|
|
|
("(language,,,)")|("(language,,)")|NULL
|
|
|
|
("(""large object"",,,)")|("(""large object"",,)")|NULL
|
|
|
|
("(schema,,,)")|("(schema,,)")|NULL
|
|
|
|
("(""operator class"",,,)")|("(""operator class"",,)")|NULL
|
|
|
|
("(operator,,,)")|("(operator,,)")|NULL
|
|
|
|
("(rule,,,)")|("(rule,,)")|NULL
|
|
|
|
("(trigger,,,)")|("(trigger,,)")|NULL
|
|
|
|
("(""operator family"",,,)")|("(""operator family"",,)")|NULL
|
|
|
|
("(extension,,,)")|("(extension,,)")|NULL
|
|
|
|
("(policy,,,)")|("(policy,,)")|NULL
|
|
|
|
("(""statistics object"",,,)")|("(""statistics object"",,)")|NULL
|
|
|
|
("(collation,,,)")|("(collation,,)")|NULL
|
|
|
|
("(""event trigger"",,,)")|("(""event trigger"",,)")|NULL
|
|
|
|
("(transform,,,)")|("(transform,,)")|NULL
|
|
|
|
("(""text search dictionary"",,,)")|("(""text search dictionary"",,)")|NULL
|
|
|
|
("(""text search parser"",,,)")|("(""text search parser"",,)")|NULL
|
|
|
|
("(""text search configuration"",,,)")|("(""text search configuration"",,)")|NULL
|
|
|
|
("(""text search template"",,,)")|("(""text search template"",,)")|NULL
|
|
|
|
("(subscription,,,)")|("(subscription,,)")|NULL
|
|
|
|
("(publication,,,)")|("(publication,,)")|NULL
|
|
|
|
("(""publication relation"",,,)")|("(""publication relation"",,)")|NULL
|
|
|
|
-- restore normal output mode
|
|
|
|
\a\t
|