File tree 5 files changed +10
-10
lines changed
5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ Check constraints:
94
94
"pathman_r4_check" CHECK (dt >= '06-01-2015'::date AND dt < '01-01-2016'::date)
95
95
Inherits: test.range_rel
96
96
97
- ALTER TABLE IF EXISTS test.nonexistent_table ATTACH PARTITION baz DEFAULT;
97
+ /* Note: PG-10 doesn't support ATTACH PARTITION ... DEFAULT */
98
+ ALTER TABLE IF EXISTS test.nonexistent_table ATTACH PARTITION baz FOR VALUES IN (42);
98
99
NOTICE: relation "nonexistent_table" does not exist, skipping
99
100
ALTER TABLE IF EXISTS test.nonexistent_table DETACH PARTITION baz;
100
101
NOTICE: relation "nonexistent_table" does not exist, skipping
Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ Check constraints:
94
94
"pathman_r4_check" CHECK (dt >= '06-01-2015'::date AND dt < '01-01-2016'::date)
95
95
Inherits: test.range_rel
96
96
97
- ALTER TABLE IF EXISTS test.nonexistent_table ATTACH PARTITION baz DEFAULT;
97
+ /* Note: PG-10 doesn't support ATTACH PARTITION ... DEFAULT */
98
+ ALTER TABLE IF EXISTS test.nonexistent_table ATTACH PARTITION baz FOR VALUES IN (42);
98
99
NOTICE: relation "nonexistent_table" does not exist, skipping
99
100
ALTER TABLE IF EXISTS test.nonexistent_table DETACH PARTITION baz;
100
101
NOTICE: relation "nonexistent_table" does not exist, skipping
Original file line number Diff line number Diff line change @@ -377,12 +377,10 @@ CREATE SCHEMA test_nonexistance;
377
377
ALTER TABLE IF EXISTS test_nonexistance.nonexistent_table RENAME TO other_table_name;
378
378
NOTICE: relation "nonexistent_table" does not exist, skipping
379
379
/* renaming existent tables already tested earlier (see rename.plain_test) */
380
- ALTER TABLE IF EXISTS test_nonexistance.nonexistent_table ADD COLUMN IF NOT EXISTS j INT4;
380
+ ALTER TABLE IF EXISTS test_nonexistance.nonexistent_table ADD COLUMN j INT4;
381
381
NOTICE: relation "nonexistent_table" does not exist, skipping
382
382
CREATE TABLE test_nonexistance.existent_table(i INT4);
383
- ALTER TABLE IF EXISTS test_nonexistance.existent_table ADD COLUMN IF NOT EXISTS i INT4;
384
- NOTICE: column "i" of relation "existent_table" already exists, skipping
385
- ALTER TABLE IF EXISTS test_nonexistance.existent_table ADD COLUMN IF NOT EXISTS j INT4;
383
+ ALTER TABLE IF EXISTS test_nonexistance.existent_table ADD COLUMN j INT4;
386
384
SELECT attname FROM pg_attribute WHERE attnum > 0 AND attrelid = 'test_nonexistance.existent_table'::REGCLASS;
387
385
attname
388
386
---------
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ CREATE TABLE test.r4 PARTITION OF test.range_rel
39
39
FOR VALUES FROM (' 2015-06-01' ) TO (' 2016-01-01' );
40
40
\d+ test .r4 ;
41
41
42
- ALTER TABLE IF EXISTS test .nonexistent_table ATTACH PARTITION baz DEFAULT;
42
+ /* Note: PG-10 doesn't support ATTACH PARTITION ... DEFAULT */
43
+ ALTER TABLE IF EXISTS test .nonexistent_table ATTACH PARTITION baz FOR VALUES IN (42 );
43
44
ALTER TABLE IF EXISTS test .nonexistent_table DETACH PARTITION baz;
44
45
45
46
DROP SCHEMA test CASCADE;
Original file line number Diff line number Diff line change @@ -258,10 +258,9 @@ CREATE SCHEMA test_nonexistance;
258
258
ALTER TABLE IF EXISTS test_nonexistance .nonexistent_table RENAME TO other_table_name;
259
259
/* renaming existent tables already tested earlier (see rename.plain_test) */
260
260
261
- ALTER TABLE IF EXISTS test_nonexistance .nonexistent_table ADD COLUMN IF NOT EXISTS j INT4;
261
+ ALTER TABLE IF EXISTS test_nonexistance .nonexistent_table ADD COLUMN j INT4;
262
262
CREATE TABLE test_nonexistance .existent_table(i INT4);
263
- ALTER TABLE IF EXISTS test_nonexistance .existent_table ADD COLUMN IF NOT EXISTS i INT4;
264
- ALTER TABLE IF EXISTS test_nonexistance .existent_table ADD COLUMN IF NOT EXISTS j INT4;
263
+ ALTER TABLE IF EXISTS test_nonexistance .existent_table ADD COLUMN j INT4;
265
264
SELECT attname FROM pg_attribute WHERE attnum > 0 AND attrelid = ' test_nonexistance.existent_table' ::REGCLASS;
266
265
DROP TABLE test_nonexistance .existent_table ;
267
266
You can’t perform that action at this time.
0 commit comments