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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
CREATE TABLE parent (
a int
);
NOTICE: DDL test: type simple, tag CREATE TABLE
ALTER TABLE parent SET (fillfactor = 50);
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET RELOPTIONS desc <NULL>
ALTER TABLE parent RESET (fillfactor);
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type RESET RELOPTIONS desc <NULL>
ALTER TABLE parent SET UNLOGGED;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET UNLOGGED desc <NULL>
ALTER TABLE parent SET LOGGED;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET LOGGED desc <NULL>
CREATE INDEX parent_index ON parent(a);
NOTICE: DDL test: type simple, tag CREATE INDEX
ALTER TABLE parent CLUSTER ON parent_index;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type CLUSTER desc index parent_index
DROP INDEX parent_index;
CREATE TABLE child () INHERITS (parent);
NOTICE: DDL test: type simple, tag CREATE TABLE
CREATE TABLE grandchild () INHERITS (child);
NOTICE: DDL test: type simple, tag CREATE TABLE
ALTER TABLE parent ADD COLUMN b serial;
NOTICE: DDL test: type simple, tag CREATE SEQUENCE
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ADD COLUMN (and recurse) desc column b of table parent
NOTICE: DDL test: type simple, tag ALTER SEQUENCE
ALTER TABLE parent RENAME COLUMN b TO c;
NOTICE: DDL test: type simple, tag ALTER TABLE
-- Constraint, no recursion
ALTER TABLE ONLY grandchild ADD CONSTRAINT a_pos CHECK (a > 0);
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ADD CONSTRAINT desc constraint a_pos on table grandchild
-- Constraint, with recursion
ALTER TABLE parent ADD CONSTRAINT a_pos CHECK (a > 0);
NOTICE: merging constraint "a_pos" with inherited definition
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ADD CONSTRAINT (and recurse) desc constraint a_pos on table parent
CREATE TABLE part (
a int
) PARTITION BY RANGE (a);
NOTICE: DDL test: type simple, tag CREATE TABLE
CREATE TABLE part1 PARTITION OF part FOR VALUES FROM (1) to (100);
NOTICE: DDL test: type simple, tag CREATE TABLE
CREATE TABLE part2 (a int);
NOTICE: DDL test: type simple, tag CREATE TABLE
ALTER TABLE part ATTACH PARTITION part2 FOR VALUES FROM (101) to (200);
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ATTACH PARTITION desc table part2
ALTER TABLE part DETACH PARTITION part2;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type DETACH PARTITION desc table part2
DROP TABLE part2;
ALTER TABLE part ADD PRIMARY KEY (a);
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET NOT NULL desc column a of table part
NOTICE: subcommand: type SET NOT NULL desc column a of table part1
NOTICE: subcommand: type ADD INDEX desc index part_pkey
ALTER TABLE parent ALTER COLUMN a SET NOT NULL;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET NOT NULL desc column a of table parent
NOTICE: subcommand: type SET NOT NULL desc column a of table child
NOTICE: subcommand: type SET NOT NULL desc column a of table grandchild
ALTER TABLE parent ALTER COLUMN a DROP NOT NULL;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type DROP NOT NULL desc column a of table parent
NOTICE: subcommand: type DROP NOT NULL desc column a of table child
NOTICE: subcommand: type DROP NOT NULL desc column a of table grandchild
ALTER TABLE parent ALTER COLUMN a SET NOT NULL;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET NOT NULL desc column a of table parent
NOTICE: subcommand: type SET NOT NULL desc column a of table child
NOTICE: subcommand: type SET NOT NULL desc column a of table grandchild
ALTER TABLE parent ALTER COLUMN a ADD GENERATED ALWAYS AS IDENTITY;
NOTICE: DDL test: type simple, tag CREATE SEQUENCE
NOTICE: DDL test: type simple, tag ALTER SEQUENCE
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ADD IDENTITY desc column a of table parent
ALTER TABLE parent ALTER COLUMN a SET GENERATED BY DEFAULT;
NOTICE: DDL test: type simple, tag ALTER SEQUENCE
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET IDENTITY desc column a of table parent
ALTER TABLE parent ALTER COLUMN a DROP IDENTITY;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type DROP IDENTITY desc column a of table parent
ALTER TABLE parent ALTER COLUMN a SET STATISTICS 100;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET STATS desc column a of table parent
NOTICE: subcommand: type SET STATS desc column a of table child
NOTICE: subcommand: type SET STATS desc column a of table grandchild
ALTER TABLE parent ALTER COLUMN a SET STORAGE PLAIN;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET STORAGE desc column a of table parent
NOTICE: subcommand: type SET STORAGE desc column a of table child
NOTICE: subcommand: type SET STORAGE desc column a of table grandchild
ALTER TABLE parent ENABLE ROW LEVEL SECURITY;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ENABLE ROW SECURITY desc <NULL>
ALTER TABLE parent NO FORCE ROW LEVEL SECURITY;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type NO FORCE ROW SECURITY desc <NULL>
ALTER TABLE parent FORCE ROW LEVEL SECURITY;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type FORCE ROW SECURITY desc <NULL>
ALTER TABLE parent DISABLE ROW LEVEL SECURITY;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type DISABLE ROW SECURITY desc <NULL>
CREATE STATISTICS parent_stat (dependencies) ON a, c FROM parent;
NOTICE: DDL test: type simple, tag CREATE STATISTICS
ALTER TABLE parent ALTER COLUMN c TYPE numeric;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ALTER COLUMN SET TYPE desc column c of table parent
NOTICE: subcommand: type ALTER COLUMN SET TYPE desc column c of table child
NOTICE: subcommand: type ALTER COLUMN SET TYPE desc column c of table grandchild
NOTICE: subcommand: type (re) ADD STATS desc statistics object parent_stat
ALTER TABLE parent ALTER COLUMN c SET DEFAULT 0;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type ALTER COLUMN SET DEFAULT desc column c of table parent
NOTICE: subcommand: type ALTER COLUMN SET DEFAULT desc column c of table child
NOTICE: subcommand: type ALTER COLUMN SET DEFAULT desc column c of table grandchild
CREATE TABLE tbl (
a int generated always as (b::int * 2) stored,
b text
);
NOTICE: DDL test: type simple, tag CREATE TABLE
ALTER TABLE tbl ALTER COLUMN a DROP EXPRESSION;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type DROP EXPRESSION desc column a of table tbl
ALTER TABLE tbl ALTER COLUMN b SET COMPRESSION pglz;
NOTICE: DDL test: type alter table, tag ALTER TABLE
NOTICE: subcommand: type SET COMPRESSION desc column b of table tbl
CREATE TYPE comptype AS (r float8);
NOTICE: DDL test: type simple, tag CREATE TYPE
CREATE DOMAIN dcomptype AS comptype;
NOTICE: DDL test: type simple, tag CREATE DOMAIN
ALTER DOMAIN dcomptype ADD CONSTRAINT c1 check ((value).r > 0);
NOTICE: DDL test: type simple, tag ALTER DOMAIN
ALTER TYPE comptype ALTER ATTRIBUTE r TYPE bigint;
NOTICE: DDL test: type alter table, tag ALTER TYPE
NOTICE: subcommand: type ALTER COLUMN SET TYPE desc column r of composite type comptype
NOTICE: subcommand: type (re) ADD DOMAIN CONSTRAINT desc type dcomptype
|