File: preseed_check.sql

package info (click to toggle)
pglogical 2.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,236 kB
  • sloc: ansic: 39,239; sql: 4,466; perl: 693; makefile: 210; sh: 77
file content (40 lines) | stat: -rw-r--r-- 1,848 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- Verify data from preseed.sql has correctly been cloned
SELECT * FROM pglogical_regress_variables()
\gset

\c :provider_dsn
SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl1'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl1 ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl2'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl2 ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl3'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl3 ORDER BY id;

\c :subscriber_dsn

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl1'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl1 ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl2'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl2 ORDER BY id;

SELECT attname, attnotnull, attisdropped from pg_attribute where attrelid = 'some_local_tbl3'::regclass and attnum > 0 order by attnum;
SELECT * FROM some_local_tbl3 ORDER BY id;

\c :provider_dsn
\set VERBOSITY terse
SELECT pglogical.replicate_ddl_command($$
	DROP SEQUENCE public.some_local_seq;
	DROP TABLE public.some_local_tbl;
	DROP TABLE public.some_local_tbl1;
	DROP TABLE public.some_local_tbl2;
	DROP TABLE public.some_local_tbl3;
$$);