# Tests which target the 'dump_test' schema, specifically.
my %dump_test_schema_runs = (
- only_dump_test_schema => 1,
- test_schema_plus_blobs => 1,
-);
+ only_dump_test_schema => 1,
+ test_schema_plus_blobs => 1,);
# Tests which are considered 'full' dumps by pg_dump, but there
# are flags used to exclude specific items (ACLs, blobs, etc).
my %full_runs = (
- binary_upgrade => 1,
- clean => 1,
- clean_if_exists => 1,
- createdb => 1,
- defaults => 1,
+ binary_upgrade => 1,
+ clean => 1,
+ clean_if_exists => 1,
+ createdb => 1,
+ defaults => 1,
exclude_dump_test_schema => 1,
- exclude_test_table => 1,
- exclude_test_table_data => 1,
- no_blobs => 1,
- no_owner => 1,
- no_privs => 1,
- pg_dumpall_dbprivs => 1,
- schema_only => 1,
- with_oids => 1,
-);
+ exclude_test_table => 1,
+ exclude_test_table_data => 1,
+ no_blobs => 1,
+ no_owner => 1,
+ no_privs => 1,
+ pg_dumpall_dbprivs => 1,
+ schema_only => 1,
+ with_oids => 1,);
# This is where the actual tests are defined.
my %tests = (
\QFOR ROLE regress_dump_test_role IN SCHEMA dump_test \E
\QGRANT SELECT ON TABLES TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'ALTER DEFAULT PRIVILEGES FOR ROLE regress_dump_test_role REVOKE' => {
create_order => 55,
\QFOR ROLE regress_dump_test_role \E
\QREVOKE ALL ON FUNCTIONS FROM PUBLIC;\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_post_data => 1, },
+ unlike => { no_privs => 1, }, },
'ALTER DEFAULT PRIVILEGES FOR ROLE regress_dump_test_role REVOKE SELECT'
=> {
\QFOR ROLE regress_dump_test_role \E
\QGRANT INSERT,REFERENCES,DELETE,TRIGGER,TRUNCATE,UPDATE ON TABLES TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_post_data => 1, },
+ unlike => { no_privs => 1, }, },
'ALTER ROLE regress_dump_test_role' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER ROLE regress_dump_test_role WITH \E
\QNOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN \E
\QNOREPLICATION NOBYPASSRLS;\E
'ALTER COLLATION test0 OWNER TO' => {
regexp => qr/^ALTER COLLATION public.test0 OWNER TO .*;/m,
collation => 1,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- %dump_test_schema_runs,
- no_owner => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { %dump_test_schema_runs, no_owner => 1, }, },
'ALTER FOREIGN DATA WRAPPER dummy OWNER TO' => {
- regexp => qr/^ALTER FOREIGN DATA WRAPPER dummy OWNER TO .*;/m,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ regexp => qr/^ALTER FOREIGN DATA WRAPPER dummy OWNER TO .*;/m,
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER SERVER s1 OWNER TO' => {
- regexp => qr/^ALTER SERVER s1 OWNER TO .*;/m,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ regexp => qr/^ALTER SERVER s1 OWNER TO .*;/m,
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER FUNCTION dump_test.pltestlang_call_handler() OWNER TO' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER FUNCTION dump_test.pltestlang_call_handler() \E
\QOWNER TO \E
.*;/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER OPERATOR FAMILY dump_test.op_family OWNER TO' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER OPERATOR FAMILY dump_test.op_family USING btree \E
\QOWNER TO \E
.*;/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER OPERATOR FAMILY dump_test.op_family USING btree' => {
create_order => 75,
\QFUNCTION 1 (integer, integer) btint4cmp(integer,integer) ,\E\n\s+
\QFUNCTION 2 (integer, integer) btint4sortsupport(internal);\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'ALTER OPERATOR CLASS dump_test.op_class OWNER TO' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER OPERATOR CLASS dump_test.op_class USING btree \E
\QOWNER TO \E
.*;/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER PUBLICATION pub1 OWNER TO' => {
- regexp => qr/^ALTER PUBLICATION pub1 OWNER TO .*;/m,
- like => {
- %full_runs,
- section_post_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ regexp => qr/^ALTER PUBLICATION pub1 OWNER TO .*;/m,
+ like => { %full_runs, section_post_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER LARGE OBJECT ... OWNER TO' => {
- regexp => qr/^ALTER LARGE OBJECT \d+ OWNER TO .*;/m,
- like => {
+ regexp => qr/^ALTER LARGE OBJECT \d+ OWNER TO .*;/m,
+ like => {
%full_runs,
- column_inserts => 1,
- data_only => 1,
- section_pre_data => 1,
- test_schema_plus_blobs => 1, },
+ column_inserts => 1,
+ data_only => 1,
+ section_pre_data => 1,
+ test_schema_plus_blobs => 1, },
unlike => {
- no_blobs => 1,
- no_owner => 1,
+ no_blobs => 1,
+ no_owner => 1,
schema_only => 1, }, },
'ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO' => {
- regexp => qr/^ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO .*;/m,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ regexp => qr/^ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO .*;/m,
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER SCHEMA dump_test OWNER TO' => {
- regexp => qr/^ALTER SCHEMA dump_test OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ regexp => qr/^ALTER SCHEMA dump_test OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER SCHEMA dump_test_second_schema OWNER TO' => {
- regexp => qr/^ALTER SCHEMA dump_test_second_schema OWNER TO .*;/m,
- like => {
+ regexp => qr/^ALTER SCHEMA dump_test_second_schema OWNER TO .*;/m,
+ like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER SEQUENCE test_table_col1_seq' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER SEQUENCE dump_test.test_table_col1_seq OWNED BY dump_test.test_table.col1;\E
/xm,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER SEQUENCE test_third_table_col1_seq' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER SEQUENCE dump_test_second_schema.test_third_table_col1_seq OWNED BY dump_test_second_schema.test_third_table.col1;\E
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, }, },
+ role => 1,
+ section_pre_data => 1, }, },
'ALTER TABLE ONLY test_table ADD CONSTRAINT ... PRIMARY KEY' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER TABLE ONLY dump_test.test_table\E \n^\s+
\QADD CONSTRAINT test_table_pkey PRIMARY KEY (col1);\E
/xm,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE ONLY test_table ALTER COLUMN col1 SET STATISTICS 90' => {
create_order => 93,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE ONLY test_table ALTER COLUMN col2 SET STORAGE' => {
create_order => 94,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE ONLY test_table ALTER COLUMN col3 SET STORAGE' => {
create_order => 95,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE ONLY test_table ALTER COLUMN col4 SET n_distinct' => {
create_order => 95,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION measurement_y2006m2'
=> {
- regexp => qr/^
+ regexp => qr/^
\QALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m2 \E
\QFOR VALUES FROM ('2006-02-01') TO ('2006-03-01');\E\n
/xm,
- like => { binary_upgrade => 1, }, },
+ like => { binary_upgrade => 1, }, },
'ALTER TABLE test_table CLUSTER ON test_table_pkey' => {
create_order => 96,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE test_table DISABLE TRIGGER ALL' => {
- regexp => qr/^
+ regexp => qr/^
\QSET SESSION AUTHORIZATION 'test_superuser';\E\n\n
\QALTER TABLE dump_test.test_table DISABLE TRIGGER ALL;\E\n\n
\QCOPY dump_test.test_table (col1, col2, col3, col4) FROM stdin;\E
\n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.\n\n\n
\QALTER TABLE dump_test.test_table ENABLE TRIGGER ALL;\E/xm,
- like => { data_only => 1, }, },
+ like => { data_only => 1, }, },
'ALTER FOREIGN TABLE foreign_table ALTER COLUMN c1 OPTIONS' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER FOREIGN TABLE dump_test.foreign_table ALTER COLUMN c1 OPTIONS (\E\n
\s+\Qcolumn_name 'col1'\E\n
\Q);\E\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'ALTER TABLE test_table OWNER TO' => {
- regexp => qr/^ALTER TABLE dump_test.test_table OWNER TO .*;/m,
- like => {
+ regexp => qr/^ALTER TABLE dump_test.test_table OWNER TO .*;/m,
+ like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1,
- no_owner => 1, }, },
+ exclude_test_table => 1,
+ no_owner => 1, }, },
'ALTER TABLE test_table ENABLE ROW LEVEL SECURITY' => {
create_order => 23,
create_sql => 'ALTER TABLE dump_test.test_table
ENABLE ROW LEVEL SECURITY;',
- regexp => qr/^ALTER TABLE dump_test.test_table ENABLE ROW LEVEL SECURITY;/m,
- like => {
+ regexp =>
+ qr/^ALTER TABLE dump_test.test_table ENABLE ROW LEVEL SECURITY;/m,
+ like => {
%full_runs,
%dump_test_schema_runs,
only_dump_test_table => 1,
- section_post_data => 1, },
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER TABLE test_second_table OWNER TO' => {
- regexp => qr/^ALTER TABLE dump_test.test_second_table OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ regexp => qr/^ALTER TABLE dump_test.test_second_table OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER TABLE test_third_table OWNER TO' => {
- regexp => qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m,
- like => {
+ regexp =>
+qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m,
+ like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER TABLE measurement OWNER TO' => {
- regexp => qr/^ALTER TABLE dump_test.measurement OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ regexp => qr/^ALTER TABLE dump_test.measurement OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER TABLE measurement_y2006m2 OWNER TO' => {
- regexp => qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m,
- like => {
+ regexp =>
+qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m,
+ like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_owner => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_owner => 1, }, },
'ALTER FOREIGN TABLE foreign_table OWNER TO' => {
- regexp => qr/^ALTER FOREIGN TABLE dump_test.foreign_table OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ regexp =>
+ qr/^ALTER FOREIGN TABLE dump_test.foreign_table OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER TEXT SEARCH CONFIGURATION alt_ts_conf1 OWNER TO' => {
regexp =>
- qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_owner => 1, }, },
+ no_owner => 1, }, },
'ALTER TEXT SEARCH DICTIONARY alt_ts_dict1 OWNER TO' => {
regexp =>
- qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
only_dump_test_table => 1,
regexp => qr/^SELECT pg_catalog\.lo_create\('\d+'\);/m,
like => {
%full_runs,
- column_inserts => 1,
- data_only => 1,
- section_pre_data => 1,
- test_schema_plus_blobs => 1, },
+ column_inserts => 1,
+ data_only => 1,
+ section_pre_data => 1,
+ test_schema_plus_blobs => 1, },
unlike => {
schema_only => 1,
- no_blobs => 1, }, },
+ no_blobs => 1, }, },
'BLOB load (using lo_from_bytea)' => {
- regexp => qr/^
+ regexp => qr/^
\QSELECT pg_catalog.lo_open\E \('\d+',\ \d+\);\n
\QSELECT pg_catalog.lowrite(0, \E
\Q'\x310a320a330a340a350a360a370a380a390a');\E\n
/xm,
like => {
%full_runs,
- column_inserts => 1,
- data_only => 1,
- section_data => 1,
- test_schema_plus_blobs => 1, },
+ column_inserts => 1,
+ data_only => 1,
+ section_data => 1,
+ test_schema_plus_blobs => 1, },
unlike => {
binary_upgrade => 1,
- no_blobs => 1,
- schema_only => 1, }, },
+ no_blobs => 1,
+ schema_only => 1, }, },
'COMMENT ON DATABASE postgres' => {
- regexp => qr/^COMMENT ON DATABASE postgres IS .*;/m,
+ regexp => qr/^COMMENT ON DATABASE postgres IS .*;/m,
+
# Should appear in the same tests as "CREATE DATABASE postgres"
- like => { createdb => 1, }, },
+ like => { createdb => 1, }, },
'COMMENT ON EXTENSION plpgsql' => {
- regexp => qr/^COMMENT ON EXTENSION plpgsql IS .*;/m,
+ regexp => qr/^COMMENT ON EXTENSION plpgsql IS .*;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'COMMENT ON TABLE dump_test.test_table' => {
create_order => 36,
create_sql => 'COMMENT ON TABLE dump_test.test_table
IS \'comment on table\';',
- regexp => qr/^COMMENT ON TABLE dump_test.test_table IS 'comment on table';/m,
- like => {
+ regexp =>
+ qr/^COMMENT ON TABLE dump_test.test_table IS 'comment on table';/m,
+ like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'COMMENT ON COLUMN dump_test.test_table.col1' => {
create_order => 36,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'COMMENT ON COLUMN dump_test.composite.f1' => {
create_order => 44,
regexp => qr/^
\QCOMMENT ON COLUMN dump_test.composite.f1 IS 'comment on column of type';\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON COLUMN dump_test.test_second_table.col1' => {
create_order => 63,
regexp => qr/^
\QCOMMENT ON COLUMN dump_test.test_second_table.col1 IS 'comment on column col1';\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON COLUMN dump_test.test_second_table.col2' => {
create_order => 64,
regexp => qr/^
\QCOMMENT ON COLUMN dump_test.test_second_table.col2 IS 'comment on column col2';\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON CONVERSION dump_test.test_conversion' => {
create_order => 79,
IS \'comment on test conversion\';',
regexp =>
qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversion';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON COLLATION test0' => {
create_order => 77,
create_sql => 'COMMENT ON COLLATION test0
IS \'comment on test0 collation\';',
regexp =>
- qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m,
+qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m,
collation => 1,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'COMMENT ON LARGE OBJECT ...' => {
create_order => 65,
/xm,
like => {
%full_runs,
- column_inserts => 1,
- data_only => 1,
- section_pre_data => 1,
- test_schema_plus_blobs => 1, },
+ column_inserts => 1,
+ data_only => 1,
+ section_pre_data => 1,
+ test_schema_plus_blobs => 1, },
unlike => {
- no_blobs => 1,
+ no_blobs => 1,
schema_only => 1, }, },
'COMMENT ON PUBLICATION pub1' => {
IS \'comment on publication\';',
regexp =>
qr/^COMMENT ON PUBLICATION pub1 IS 'comment on publication';/m,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'COMMENT ON SUBSCRIPTION sub1' => {
create_order => 55,
IS \'comment on subscription\';',
regexp =>
qr/^COMMENT ON SUBSCRIPTION sub1 IS 'comment on subscription';/m,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1' => {
create_order => 84,
IS \'comment on text search configuration\';',
regexp =>
qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on text search configuration';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => {
create_order => 84,
IS \'comment on text search dictionary\';',
regexp =>
qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text search dictionary';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1' => {
create_order => 84,
IS \'comment on text search parser\';',
regexp =>
qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text search parser';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => {
create_order => 84,
IS \'comment on text search template\';',
regexp =>
qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text search template';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TYPE dump_test.planets - ENUM' => {
create_order => 68,
create_sql => 'COMMENT ON TYPE dump_test.planets
IS \'comment on enum type\';',
- regexp => qr/^COMMENT ON TYPE dump_test.planets IS 'comment on enum type';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ regexp =>
+ qr/^COMMENT ON TYPE dump_test.planets IS 'comment on enum type';/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TYPE dump_test.textrange - RANGE' => {
create_order => 69,
create_sql => 'COMMENT ON TYPE dump_test.textrange
IS \'comment on range type\';',
- regexp => qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ regexp =>
+qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TYPE dump_test.int42 - Regular' => {
create_order => 70,
create_sql => 'COMMENT ON TYPE dump_test.int42
IS \'comment on regular type\';',
- regexp => qr/^COMMENT ON TYPE dump_test.int42 IS 'comment on regular type';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ regexp =>
+ qr/^COMMENT ON TYPE dump_test.int42 IS 'comment on regular type';/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COMMENT ON TYPE dump_test.undefined - Undefined' => {
create_order => 71,
create_sql => 'COMMENT ON TYPE dump_test.undefined
IS \'comment on undefined type\';',
regexp =>
- qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'COPY test_table' => {
create_order => 4,
like => {
%full_runs,
%dump_test_schema_runs,
- data_only => 1,
- only_dump_test_table => 1,
- section_data => 1, },
+ data_only => 1,
+ only_dump_test_table => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- exclude_test_table => 1,
- exclude_test_table_data => 1,
- schema_only => 1, }, },
+ exclude_test_table => 1,
+ exclude_test_table_data => 1,
+ schema_only => 1, }, },
'COPY fk_reference_test_table' => {
create_order => 22,
exclude_test_table_data => 1,
section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
# In a data-only dump, we try to actually order according to FKs,
# so this check is just making sure that the referring table comes after
# the referred-to table.
'COPY fk_reference_test_table second' => {
- regexp => qr/^
+ regexp => qr/^
\QCOPY dump_test.test_table (col1, col2, col3, col4) FROM stdin;\E
\n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.\n.*
\QCOPY dump_test.fk_reference_test_table (col1) FROM stdin;\E
\n(?:\d\n){5}\\\.\n
/xms,
- like => { data_only => 1, }, },
+ like => { data_only => 1, }, },
'COPY test_second_table' => {
create_order => 7,
like => {
%full_runs,
%dump_test_schema_runs,
- data_only => 1,
- section_data => 1, },
+ data_only => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
'COPY test_third_table' => {
create_order => 12,
/xm,
like => {
%full_runs,
- data_only => 1,
- role => 1,
- section_data => 1, },
+ data_only => 1,
+ role => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_test_table_data => 1,
- schema_only => 1,
- with_oids => 1, }, },
+ schema_only => 1,
+ with_oids => 1, }, },
'COPY test_third_table WITH OIDS' => {
- regexp => qr/^
+ regexp => qr/^
\QCOPY dump_test_second_schema.test_third_table (col1) WITH OIDS FROM stdin;\E
\n(?:\d+\t\d\n){9}\\\.\n
/xm,
- like => { with_oids => 1, }, },
+ like => { with_oids => 1, }, },
'COPY test_fourth_table' => {
create_order => 7,
like => {
%full_runs,
%dump_test_schema_runs,
- data_only => 1,
- section_data => 1, },
+ data_only => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
'COPY test_fifth_table' => {
create_order => 54,
like => {
%full_runs,
%dump_test_schema_runs,
- data_only => 1,
- section_data => 1, },
+ data_only => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
'COPY test_table_identity' => {
create_order => 54,
like => {
%full_runs,
%dump_test_schema_runs,
- data_only => 1,
- section_data => 1, },
+ data_only => 1,
+ section_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
'INSERT INTO test_table' => {
- regexp => qr/^
+ regexp => qr/^
(?:INSERT\ INTO\ dump_test.test_table\ \(col1,\ col2,\ col3,\ col4\)\ VALUES\ \(\d,\ NULL,\ NULL,\ NULL\);\n){9}
/xm,
- like => { column_inserts => 1, }, },
+ like => { column_inserts => 1, }, },
'INSERT INTO test_second_table' => {
- regexp => qr/^
+ regexp => qr/^
(?:INSERT\ INTO\ dump_test.test_second_table\ \(col1,\ col2\)
\ VALUES\ \(\d,\ '\d'\);\n){9}/xm,
- like => { column_inserts => 1, }, },
+ like => { column_inserts => 1, }, },
'INSERT INTO test_third_table' => {
- regexp => qr/^
+ regexp => qr/^
(?:INSERT\ INTO\ dump_test_second_schema.test_third_table\ \(col1\)
\ VALUES\ \(\d\);\n){9}/xm,
- like => { column_inserts => 1, }, },
+ like => { column_inserts => 1, }, },
'INSERT INTO test_fourth_table' => {
- regexp => qr/^\QINSERT INTO dump_test.test_fourth_table DEFAULT VALUES;\E/m,
- like => { column_inserts => 1, }, },
+ regexp =>
+ qr/^\QINSERT INTO dump_test.test_fourth_table DEFAULT VALUES;\E/m,
+ like => { column_inserts => 1, }, },
'INSERT INTO test_fifth_table' => {
regexp =>
qr/^\QINSERT INTO dump_test.test_fifth_table (col1, col2, col3, col4, col5) VALUES (NULL, true, false, B'11001', 'NaN');\E/m,
- like => { column_inserts => 1, }, },
+ like => { column_inserts => 1, }, },
'INSERT INTO test_table_identity' => {
regexp =>
qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUES (1, 'test');\E/m,
- like => { column_inserts => 1, }, },
+ like => { column_inserts => 1, }, },
'CREATE ROLE regress_dump_test_role' => {
create_order => 1,
'CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;',
regexp =>
qr/CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE COLLATION test0 FROM "C"' => {
create_order => 76,
regexp => qr/^
\QCREATE COLLATION public.test0 (provider = libc, locale = 'C');\E/xm,
collation => 1,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE CAST FOR timestamptz' => {
create_order => 51,
'CREATE CAST (timestamptz AS interval) WITH FUNCTION age(timestamptz) AS ASSIGNMENT;',
regexp =>
qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog\.age\(timestamp with time zone\) AS ASSIGNMENT;/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE DATABASE postgres' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE DATABASE postgres WITH TEMPLATE = template0 \E
.*;/xm,
- like => { createdb => 1, }, },
+ like => { createdb => 1, }, },
'CREATE DATABASE dump_test' => {
create_order => 47,
regexp => qr/^
\QCREATE DATABASE dump_test WITH TEMPLATE = template0 \E
.*;/xm,
- like => { pg_dumpall_dbprivs => 1, }, },
+ like => { pg_dumpall_dbprivs => 1, }, },
'CREATE EXTENSION ... plpgsql' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\E
/xm,
+
# this shouldn't ever get emitted anymore
like => {}, },
like => {
%full_runs,
%dump_test_schema_runs,
- exclude_test_table => 1,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ exclude_test_table => 1,
+ section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE CONVERSION dump_test.test_conversion' => {
create_order => 78,
'CREATE DEFAULT CONVERSION dump_test.test_conversion FOR \'LATIN1\' TO \'UTF8\' FROM iso8859_1_to_utf8;',
regexp =>
qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;\E/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE DOMAIN dump_test.us_postal_code' => {
create_order => 29,
\$\Q'::text) OR (VALUE ~ '^\d{5}-\d{4}\E\$
\Q'::text)));\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FUNCTION dump_test.pltestlang_call_handler' => {
create_order => 17,
\n\s+AS\ \'\$
\Qlibdir\/plpgsql', 'plpgsql_call_handler';\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FUNCTION dump_test.trigger_func' => {
create_order => 30,
\n\s+AS\ \$\$
\Q BEGIN RETURN NULL; END;\E
\$\$;/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FUNCTION dump_test.event_trigger_func' => {
create_order => 32,
\n\s+AS\ \$\$
\Q BEGIN RETURN; END;\E
\$\$;/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE OPERATOR FAMILY dump_test.op_family' => {
create_order => 73,
regexp => qr/^
\QCREATE OPERATOR FAMILY dump_test.op_family USING btree;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE OPERATOR CLASS dump_test.op_class' => {
create_order => 74,
\QFUNCTION 1 (bigint, bigint) btint8cmp(bigint,bigint) ,\E\n\s+
\QFUNCTION 2 (bigint, bigint) btint8sortsupport(internal);\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE EVENT TRIGGER test_event_trigger' => {
create_order => 33,
\QON ddl_command_start\E
\n\s+\QEXECUTE PROCEDURE dump_test.event_trigger_func();\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'CREATE TRIGGER test_trigger' => {
create_order => 31,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
- exclude_test_table => 1,
+ exclude_test_table => 1,
exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.planets AS ENUM' => {
\n\s+'earth',
\n\s+'mars'
\n\);/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.planets AS ENUM pg_upgrade' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE TYPE dump_test.planets AS ENUM (\E
\n\);.*^
\QALTER TYPE dump_test.planets ADD VALUE 'venus';\E
\n.*^
\QALTER TYPE dump_test.planets ADD VALUE 'mars';\E
\n/xms,
- like => { binary_upgrade => 1, }, },
+ like => { binary_upgrade => 1, }, },
'CREATE TYPE dump_test.textrange AS RANGE' => {
create_order => 38,
\n\s+\Qsubtype = text,\E
\n\s+\Qcollation = pg_catalog."C"\E
\n\);/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.int42' => {
create_order => 39,
create_sql => 'CREATE TYPE dump_test.int42;',
regexp => qr/^CREATE TYPE dump_test.int42;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1' => {
create_order => 80,
regexp => qr/^
\QCREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 (\E\n
\s+\QPARSER = pg_catalog."default" );\E/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 ...' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
\s+\QADD MAPPING FOR asciiword WITH english_stem;\E\n
\n
\s+\QADD MAPPING FOR uint WITH simple;\E\n
\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => {
create_order => 81,
regexp => qr/^
\QCREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 (\E\n
\s+\QLEXIZE = dsimple_lexize );\E/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TEXT SEARCH PARSER dump_test.alt_ts_prs1' => {
create_order => 82,
\s+\QEND = prsd_end,\E\n
\s+\QLEXTYPES = prsd_lextype );\E\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => {
create_order => 83,
\QCREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (\E\n
\s+\QTEMPLATE = pg_catalog.simple );\E\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FUNCTION dump_test.int42_in' => {
create_order => 40,
\n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
\n\s+AS\ \$\$int4in\$\$;
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FUNCTION dump_test.int42_out' => {
create_order => 41,
\n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
\n\s+AS\ \$\$int4out\$\$;
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE PROCEDURE dump_test.ptest1' => {
create_order => 41,
\n\s+\QLANGUAGE sql\E
\n\s+AS\ \$\$\Q INSERT INTO dump_test.test_table (col1) VALUES (a) \E\$\$;
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.int42 populated' => {
create_order => 42,
\n\s+\QSTORAGE = plain,\E
\n\s+PASSEDBYVALUE\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.composite' => {
create_order => 43,
\n\s+\Qf2 dump_test.int42\E
\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TYPE dump_test.undefined' => {
create_order => 39,
create_sql => 'CREATE TYPE dump_test.undefined;',
regexp => qr/^CREATE TYPE dump_test.undefined;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE FOREIGN DATA WRAPPER dummy' => {
create_order => 35,
create_sql => 'CREATE FOREIGN DATA WRAPPER dummy;',
regexp => qr/CREATE FOREIGN DATA WRAPPER dummy;/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy' => {
create_order => 36,
create_sql => 'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;',
regexp => qr/CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE FOREIGN TABLE dump_test.foreign_table SERVER s1' => {
create_order => 88,
\s+\Qschema_name 'x1'\E\n
\Q);\E\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE USER MAPPING FOR regress_dump_test_role SERVER s1' => {
create_order => 86,
'CREATE USER MAPPING FOR regress_dump_test_role SERVER s1;',
regexp =>
qr/CREATE USER MAPPING FOR regress_dump_test_role SERVER s1;/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE TRANSFORM FOR int' => {
create_order => 34,
'CREATE TRANSFORM FOR int LANGUAGE SQL (FROM SQL WITH FUNCTION varchar_transform(internal), TO SQL WITH FUNCTION int4recv(internal));',
regexp =>
qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog\.varchar_transform\(internal\), TO SQL WITH FUNCTION pg_catalog\.int4recv\(internal\)\);/m,
- like => {
- %full_runs,
- section_pre_data => 1, }, },
+ like => { %full_runs, section_pre_data => 1, }, },
'CREATE LANGUAGE pltestlang' => {
create_order => 18,
regexp => qr/^
\QCREATE PROCEDURAL LANGUAGE pltestlang \E
\QHANDLER dump_test.pltestlang_call_handler;\E
- /xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ /xm,
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE MATERIALIZED VIEW matview' => {
create_order => 20,
\n\s+\QFROM dump_test.test_table\E
\n\s+\QWITH NO DATA;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE MATERIALIZED VIEW matview_second' => {
create_order => 21,
\n\s+\QFROM dump_test.matview\E
\n\s+\QWITH NO DATA;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE MATERIALIZED VIEW matview_third' => {
create_order => 58,
\n\s+\QFROM dump_test.matview_second\E
\n\s+\QWITH NO DATA;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE MATERIALIZED VIEW matview_fourth' => {
create_order => 59,
\n\s+\QFROM dump_test.matview_third\E
\n\s+\QWITH NO DATA;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE POLICY p1 ON test_table' => {
create_order => 22,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE POLICY p2 ON test_table FOR SELECT' => {
create_order => 24,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE POLICY p3 ON test_table FOR INSERT' => {
create_order => 25,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE POLICY p4 ON test_table FOR UPDATE' => {
create_order => 26,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE POLICY p5 ON test_table FOR DELETE' => {
create_order => 27,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE POLICY p6 ON test_table AS RESTRICTIVE' => {
create_order => 27,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_post_data => 1, },
+ only_dump_test_table => 1,
+ section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE PUBLICATION pub1' => {
create_order => 50,
regexp => qr/^
\QCREATE PUBLICATION pub1 WITH (publish = 'insert, update, delete, truncate');\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'CREATE PUBLICATION pub2' => {
create_order => 50,
regexp => qr/^
\QCREATE PUBLICATION pub2 FOR ALL TABLES WITH (publish = '');\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'CREATE SUBSCRIPTION sub1' => {
create_order => 50,
regexp => qr/^
\QCREATE SUBSCRIPTION sub1 CONNECTION 'dbname=doesnotexist' PUBLICATION pub1 WITH (connect = false, slot_name = 'sub1');\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, }, },
+ like => { %full_runs, section_post_data => 1, }, },
'ALTER PUBLICATION pub1 ADD TABLE test_table' => {
create_order => 51,
regexp => qr/^
\QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_table;\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, },
+ like => { %full_runs, section_post_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'ALTER PUBLICATION pub1 ADD TABLE test_second_table' => {
create_order => 52,
regexp => qr/^
\QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table;\E
/xm,
- like => {
- %full_runs,
- section_post_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like => { %full_runs, section_post_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE SCHEMA public' => {
- regexp => qr/^CREATE SCHEMA public;/m,
+ regexp => qr/^CREATE SCHEMA public;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'CREATE SCHEMA dump_test' => {
create_order => 2,
create_sql => 'CREATE SCHEMA dump_test;',
regexp => qr/^CREATE SCHEMA dump_test;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE SCHEMA dump_test_second_schema' => {
create_order => 9,
regexp => qr/^CREATE SCHEMA dump_test_second_schema;/m,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, }, },
+ role => 1,
+ section_pre_data => 1, }, },
'CREATE TABLE test_table' => {
create_order => 3,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1, }, },
+ exclude_test_table => 1, }, },
'CREATE TABLE fk_reference_test_table' => {
create_order => 21,
\n\s+\Qcol1 integer NOT NULL\E
\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TABLE test_second_table' => {
create_order => 6,
\n\s+\Qcol2 text\E
\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE UNLOGGED TABLE test_third_table WITH OIDS' => {
create_order => 11,
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
+ role => 1,
+ section_pre_data => 1, },
unlike => {
+
# FIXME figure out why/how binary upgrade drops OIDs.
binary_upgrade => 1, }, },
\)\n
\QPARTITION BY RANGE (logdate);\E\n
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1, }, },
'CREATE TABLE measurement_y2006m2 PARTITION OF' => {
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- binary_upgrade => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { binary_upgrade => 1, }, },
'CREATE TABLE test_fourth_table_zero_col' => {
create_order => 6,
\QCREATE TABLE dump_test.test_fourth_table (\E
\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TABLE test_fifth_table' => {
create_order => 53,
\n\s+\Qcol5 double precision\E
\n\);
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE TABLE test_table_identity' => {
create_order => 3,
\s+\QCACHE 1\E\n
\);
/xms,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE STATISTICS extended_stats_no_options' => {
create_order => 97,
regexp => qr/^
\QCREATE STATISTICS dump_test.test_ext_stats_no_options ON col1, col2 FROM dump_test.test_fifth_table;\E
/xms,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE STATISTICS extended_stats_options' => {
create_order => 97,
regexp => qr/^
\QCREATE STATISTICS dump_test.test_ext_stats_opts (ndistinct) ON col1, col2 FROM dump_test.test_fifth_table;\E
/xms,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE SEQUENCE test_table_col1_seq' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE SEQUENCE dump_test.test_table_col1_seq\E
\n\s+\QAS integer\E
\n\s+\QSTART WITH 1\E
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE SEQUENCE test_third_table_col1_seq' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE SEQUENCE dump_test_second_schema.test_third_table_col1_seq\E
\n\s+\QAS integer\E
\n\s+\QSTART WITH 1\E
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, }, },
+ role => 1,
+ section_pre_data => 1, }, },
'CREATE UNIQUE INDEX test_third_table_idx ON test_third_table' => {
create_order => 13,
/xm,
like => {
%full_runs,
- role => 1,
- section_post_data => 1, }, },
+ role => 1,
+ section_post_data => 1, }, },
'CREATE INDEX ON ONLY measurement' => {
create_order => 92,
- create_sql => 'CREATE INDEX ON dump_test.measurement (city_id, logdate);',
+ create_sql =>
+ 'CREATE INDEX ON dump_test.measurement (city_id, logdate);',
regexp => qr/^
\QCREATE INDEX measurement_city_id_logdate_idx ON ONLY dump_test.measurement USING\E
/xm,
like => {
- binary_upgrade => 1,
- clean => 1,
- clean_if_exists => 1,
- createdb => 1,
- defaults => 1,
- exclude_test_table => 1,
- exclude_test_table_data => 1,
- no_blobs => 1,
- no_privs => 1,
- no_owner => 1,
- only_dump_test_schema => 1,
- pg_dumpall_dbprivs => 1,
- schema_only => 1,
- section_post_data => 1,
- test_schema_plus_blobs => 1,
- with_oids => 1, },
+ binary_upgrade => 1,
+ clean => 1,
+ clean_if_exists => 1,
+ createdb => 1,
+ defaults => 1,
+ exclude_test_table => 1,
+ exclude_test_table_data => 1,
+ no_blobs => 1,
+ no_privs => 1,
+ no_owner => 1,
+ only_dump_test_schema => 1,
+ pg_dumpall_dbprivs => 1,
+ schema_only => 1,
+ section_post_data => 1,
+ test_schema_plus_blobs => 1,
+ with_oids => 1, },
unlike => {
exclude_dump_test_schema => 1,
only_dump_test_table => 1,
all_runs => 1,
catch_all => 'CREATE ... commands',
create_order => 93,
- create_sql => 'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);',
+ create_sql =>
+'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);',
regexp => qr/^
\QALTER TABLE ONLY dump_test.measurement\E \n^\s+
\QADD CONSTRAINT measurement_pkey PRIMARY KEY (city_id, logdate);\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'CREATE INDEX ... ON measurement_y2006_m2' => {
- regexp => qr/^
+ regexp => qr/^
\QCREATE INDEX measurement_y2006m2_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m2 \E
/xm,
like => {
%full_runs,
- role => 1,
- section_post_data => 1, }, },
+ role => 1,
+ section_post_data => 1, }, },
'ALTER INDEX ... ATTACH PARTITION' => {
- regexp => qr/^
+ regexp => qr/^
\QALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_city_id_logdate_idx\E
/xm,
like => {
%full_runs,
- role => 1,
- section_post_data => 1, }, },
+ role => 1,
+ section_post_data => 1, }, },
'ALTER INDEX ... ATTACH PARTITION (primary key)' => {
- all_runs => 1,
- catch_all => 'CREATE ... commands',
- regexp => qr/^
+ all_runs => 1,
+ catch_all => 'CREATE ... commands',
+ regexp => qr/^
\QALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_pkey\E
/xm,
like => {
\n\s+\QSELECT test_table.col1\E
\n\s+\QFROM dump_test.test_table\E
\n\s+\QWITH LOCAL CHECK OPTION;\E/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
'ALTER VIEW test_view SET DEFAULT' => {
create_order => 62,
'ALTER VIEW dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;',
regexp => qr/^
\QALTER TABLE ONLY dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;\E/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
- unlike => {
- exclude_dump_test_schema => 1, }, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+ unlike => { exclude_dump_test_schema => 1, }, },
# FIXME
'DROP SCHEMA public (for testing without public schema)' => {
like => {}, },
'DROP SCHEMA public' => {
- regexp => qr/^DROP SCHEMA public;/m,
+ regexp => qr/^DROP SCHEMA public;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'DROP SCHEMA IF EXISTS public' => {
- regexp => qr/^DROP SCHEMA IF EXISTS public;/m,
+ regexp => qr/^DROP SCHEMA IF EXISTS public;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'DROP EXTENSION plpgsql' => {
- regexp => qr/^DROP EXTENSION plpgsql;/m,
+ regexp => qr/^DROP EXTENSION plpgsql;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'DROP FUNCTION dump_test.pltestlang_call_handler()' => {
regexp => qr/^DROP FUNCTION dump_test\.pltestlang_call_handler\(\);/m,
like => { clean => 1, }, },
'DROP LANGUAGE pltestlang' => {
- regexp => qr/^DROP PROCEDURAL LANGUAGE pltestlang;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP PROCEDURAL LANGUAGE pltestlang;/m,
+ like => { clean => 1, }, },
'DROP SCHEMA dump_test' => {
- regexp => qr/^DROP SCHEMA dump_test;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP SCHEMA dump_test;/m,
+ like => { clean => 1, }, },
'DROP SCHEMA dump_test_second_schema' => {
- regexp => qr/^DROP SCHEMA dump_test_second_schema;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP SCHEMA dump_test_second_schema;/m,
+ like => { clean => 1, }, },
'DROP TABLE test_table' => {
- regexp => qr/^DROP TABLE dump_test\.test_table;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP TABLE dump_test\.test_table;/m,
+ like => { clean => 1, }, },
'DROP TABLE fk_reference_test_table' => {
- regexp => qr/^DROP TABLE dump_test\.fk_reference_test_table;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP TABLE dump_test\.fk_reference_test_table;/m,
+ like => { clean => 1, }, },
'DROP TABLE test_second_table' => {
- regexp => qr/^DROP TABLE dump_test\.test_second_table;/m,
- like => { clean => 1, }, },
+ regexp => qr/^DROP TABLE dump_test\.test_second_table;/m,
+ like => { clean => 1, }, },
'DROP TABLE test_third_table' => {
regexp => qr/^DROP TABLE dump_test_second_schema\.test_third_table;/m,
like => { clean => 1, }, },
'DROP EXTENSION IF EXISTS plpgsql' => {
- regexp => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,
+ regexp => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,
+
# this shouldn't ever get emitted anymore
- like => {}, },
+ like => {}, },
'DROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler()' => {
- regexp => qr/^
+ regexp => qr/^
\QDROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler();\E
/xm,
- like => { clean_if_exists => 1, }, },
+ like => { clean_if_exists => 1, }, },
'DROP LANGUAGE IF EXISTS pltestlang' => {
- regexp => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
- like => { clean_if_exists => 1, }, },
+ regexp => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
+ like => { clean_if_exists => 1, }, },
'DROP SCHEMA IF EXISTS dump_test' => {
- regexp => qr/^DROP SCHEMA IF EXISTS dump_test;/m,
- like => { clean_if_exists => 1, }, },
+ regexp => qr/^DROP SCHEMA IF EXISTS dump_test;/m,
+ like => { clean_if_exists => 1, }, },
'DROP SCHEMA IF EXISTS dump_test_second_schema' => {
- regexp => qr/^DROP SCHEMA IF EXISTS dump_test_second_schema;/m,
- like => { clean_if_exists => 1, }, },
+ regexp => qr/^DROP SCHEMA IF EXISTS dump_test_second_schema;/m,
+ like => { clean_if_exists => 1, }, },
'DROP TABLE IF EXISTS test_table' => {
- regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
- like => { clean_if_exists => 1, }, },
+ regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
+ like => { clean_if_exists => 1, }, },
'DROP TABLE IF EXISTS test_second_table' => {
- regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_second_table;/m,
- like => { clean_if_exists => 1, }, },
+ regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_second_table;/m,
+ like => { clean_if_exists => 1, }, },
'DROP TABLE IF EXISTS test_third_table' => {
- regexp => qr/^
+ regexp => qr/^
\QDROP TABLE IF EXISTS dump_test_second_schema.test_third_table;\E
/xm,
- like => { clean_if_exists => 1, }, },
+ like => { clean_if_exists => 1, }, },
'DROP ROLE regress_dump_test_role' => {
- regexp => qr/^
+ regexp => qr/^
\QDROP ROLE regress_dump_test_role;\E
/xm,
- like => { pg_dumpall_globals_clean => 1, }, },
+ like => { pg_dumpall_globals_clean => 1, }, },
'DROP ROLE pg_' => {
- regexp => qr/^
+ regexp => qr/^
\QDROP ROLE pg_\E.*;
/xm,
+
# this shouldn't ever get emitted anywhere
- like => {}, },
+ like => {}, },
'GRANT USAGE ON SCHEMA dump_test_second_schema' => {
create_order => 10,
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT USAGE ON FOREIGN DATA WRAPPER dummy' => {
create_order => 85,
regexp => qr/^
\QGRANT ALL ON FOREIGN DATA WRAPPER dummy TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT USAGE ON FOREIGN SERVER s1' => {
create_order => 85,
regexp => qr/^
\QGRANT ALL ON FOREIGN SERVER s1 TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT USAGE ON DOMAIN dump_test.us_postal_code' => {
create_order => 72,
regexp => qr/^
\QGRANT ALL ON TYPE dump_test.us_postal_code TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT USAGE ON TYPE dump_test.int42' => {
create_order => 87,
regexp => qr/^
\QGRANT ALL ON TYPE dump_test.int42 TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT USAGE ON TYPE dump_test.planets - ENUM' => {
create_order => 66,
regexp => qr/^
\QGRANT ALL ON TYPE dump_test.planets TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT USAGE ON TYPE dump_test.textrange - RANGE' => {
create_order => 67,
- create_sql => 'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;',
+ create_sql =>
+'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;',
regexp => qr/^
\QGRANT ALL ON TYPE dump_test.textrange TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT CREATE ON DATABASE dump_test' => {
create_order => 48,
regexp => qr/^
\QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E
/xm,
- like => { pg_dumpall_dbprivs => 1, }, },
+ like => { pg_dumpall_dbprivs => 1, }, },
'GRANT SELECT ON TABLE test_table' => {
create_order => 5,
create_sql => 'GRANT SELECT ON TABLE dump_test.test_table
TO regress_dump_test_role;',
regexp =>
- qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m,
+qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- section_pre_data => 1, },
+ only_dump_test_table => 1,
+ section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- exclude_test_table => 1,
- no_privs => 1, }, },
+ exclude_test_table => 1,
+ no_privs => 1, }, },
'GRANT SELECT ON TABLE test_third_table' => {
create_order => 19,
qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_dump_test_role;/m,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT ALL ON SEQUENCE test_third_table_col1_seq' => {
create_order => 28,
/xm,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT SELECT ON TABLE measurement' => {
create_order => 91,
TABLE dump_test.measurement
TO regress_dump_test_role;',
regexp =>
- qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT SELECT ON TABLE measurement_y2006m2' => {
create_order => 92,
create_sql => 'GRANT SELECT ON
TABLE dump_test_second_schema.measurement_y2006m2
TO regress_dump_test_role;',
- regexp => qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m,
+ regexp =>
+qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m,
like => {
%full_runs,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT ALL ON LARGE OBJECT ...' => {
create_order => 60,
/xm,
like => {
%full_runs,
- column_inserts => 1,
- data_only => 1,
- section_pre_data => 1,
- test_schema_plus_blobs => 1, },
+ column_inserts => 1,
+ data_only => 1,
+ section_pre_data => 1,
+ test_schema_plus_blobs => 1, },
unlike => {
binary_upgrade => 1,
- no_blobs => 1,
- no_privs => 1,
- schema_only => 1, }, },
+ no_blobs => 1,
+ no_privs => 1,
+ schema_only => 1, }, },
'GRANT INSERT(col1) ON TABLE test_second_table' => {
create_order => 8,
regexp => qr/^
\QGRANT INSERT(col1) ON TABLE dump_test.test_second_table TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_pre_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
unlike => {
exclude_dump_test_schema => 1,
- no_privs => 1, }, },
+ no_privs => 1, }, },
'GRANT EXECUTE ON FUNCTION pg_sleep() TO regress_dump_test_role' => {
create_order => 16,
regexp => qr/^
\QGRANT ALL ON FUNCTION pg_catalog.pg_sleep(double precision) TO regress_dump_test_role;\E
/xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT SELECT (proname ...) ON TABLE pg_proc TO public' => {
create_order => 46,
\QGRANT SELECT(probin) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
\QGRANT SELECT(proconfig) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
\QGRANT SELECT(proacl) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E/xms,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'GRANT USAGE ON SCHEMA public TO public' => {
regexp => qr/^
\Q--\E\n\n
\QGRANT USAGE ON SCHEMA public TO PUBLIC;\E
/xm,
+
# this shouldn't ever get emitted anymore
like => {}, },
'REFRESH MATERIALIZED VIEW matview' => {
- regexp => qr/^REFRESH MATERIALIZED VIEW dump_test.matview;/m,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
+ regexp => qr/^REFRESH MATERIALIZED VIEW dump_test.matview;/m,
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
'REFRESH MATERIALIZED VIEW matview_second' => {
- regexp => qr/^
+ regexp => qr/^
\QREFRESH MATERIALIZED VIEW dump_test.matview;\E
\n.*
\QREFRESH MATERIALIZED VIEW dump_test.matview_second;\E
/xms,
- like => {
- %full_runs,
- %dump_test_schema_runs,
- section_post_data => 1, },
+ like =>
+ { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
unlike => {
- binary_upgrade => 1,
+ binary_upgrade => 1,
exclude_dump_test_schema => 1,
- schema_only => 1, }, },
+ schema_only => 1, }, },
# FIXME
'REFRESH MATERIALIZED VIEW matview_third' => {
- regexp => qr/^
+ regexp => qr/^
\QREFRESH MATERIALIZED VIEW dump_test.matview_third;\E
/xms,
- like => {}, },
+ like => {}, },
# FIXME
'REFRESH MATERIALIZED VIEW matview_fourth' => {
- regexp => qr/^
+ regexp => qr/^
\QREFRESH MATERIALIZED VIEW dump_test.matview_fourth;\E
/xms,
- like => {}, },
+ like => {}, },
'REVOKE CONNECT ON DATABASE dump_test FROM public' => {
create_order => 49,
\QGRANT TEMPORARY ON DATABASE dump_test TO PUBLIC;\E\n
\QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E
/xm,
- like => { pg_dumpall_dbprivs => 1, }, },
+ like => { pg_dumpall_dbprivs => 1, }, },
'REVOKE EXECUTE ON FUNCTION pg_sleep() FROM public' => {
create_order => 15,
regexp => qr/^
\QREVOKE ALL ON FUNCTION pg_catalog.pg_sleep(double precision) FROM PUBLIC;\E
/xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'REVOKE SELECT ON TABLE pg_proc FROM public' => {
create_order => 45,
create_sql => 'REVOKE SELECT ON TABLE pg_proc FROM public;',
- regexp => qr/^REVOKE SELECT ON TABLE pg_catalog.pg_proc FROM PUBLIC;/m,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ regexp =>
+ qr/^REVOKE SELECT ON TABLE pg_catalog.pg_proc FROM PUBLIC;/m,
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'REVOKE CREATE ON SCHEMA public FROM public' => {
create_order => 16,
\QREVOKE ALL ON SCHEMA public FROM PUBLIC;\E
\n\QGRANT USAGE ON SCHEMA public TO PUBLIC;\E
/xm,
- like => {
- %full_runs,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ like => { %full_runs, section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
'REVOKE USAGE ON LANGUAGE plpgsql FROM public' => {
create_order => 16,
like => {
%full_runs,
%dump_test_schema_runs,
- only_dump_test_table => 1,
- role => 1,
- section_pre_data => 1, },
- unlike => {
- no_privs => 1, }, },
+ only_dump_test_table => 1,
+ role => 1,
+ section_pre_data => 1, },
+ unlike => { no_privs => 1, }, },
);
next;
}
- # If there is a like entry, but no unlike entry, then we will test the like case
- if ($tests{$test}->{like}->{$test_key} && !defined($tests{$test}->{unlike}->{$test_key}))
+# If there is a like entry, but no unlike entry, then we will test the like case
+ if ($tests{$test}->{like}->{$test_key}
+ && !defined($tests{$test}->{unlike}->{$test_key}))
{
$num_tests++;
}
# Run the test listed as a like, unless it is specifically noted
# as an unlike (generally due to an explicit exclusion or similar).
- if ($tests{$test}->{like}->{$test_key} && !defined($tests{$test}->{unlike}->{$test_key}))
+ if ($tests{$test}->{like}->{$test_key}
+ && !defined($tests{$test}->{unlike}->{$test_key}))
{
- if (!ok($output_file =~ $tests{$test}->{regexp}, "$run: should dump $test"))
+ if (!ok($output_file =~ $tests{$test}->{regexp},
+ "$run: should dump $test"))
{
diag("Review $run results in $tempdir");
}
}
else
{
- if (!ok(
- $output_file !~
- $tests{$test}->{regexp},
- "$run: should not dump $test"))
+ if (!ok($output_file !~ $tests{$test}->{regexp},
+ "$run: should not dump $test"))
{
diag("Review $run results in $tempdir");
}