minor refactor on src/test/modules/test_ddl_deparse/sql/alter_table.sql - Mailing list pgsql-hackers

From jian he
Subject minor refactor on src/test/modules/test_ddl_deparse/sql/alter_table.sql
Date
Msg-id CACJufxFDi7fnwB-8xXd_ExML7-7pKbTaK4j46AJ=4-14DXvtVg@mail.gmail.com
Whole thread Raw
Responses Re: minor refactor on src/test/modules/test_ddl_deparse/sql/alter_table.sql
List pgsql-hackers
hi.

in src/test/modules/test_ddl_deparse/sql/alter_table.sql:
----------------------------
ALTER TABLE parent ADD CONSTRAINT a_pos CHECK (a > 0);
CREATE TABLE part (
    a int
) PARTITION BY RANGE (a);

CREATE TABLE part1 PARTITION OF part FOR VALUES FROM (1) to (100);
CREATE TABLE part2 (a int);
ALTER TABLE part ATTACH PARTITION part2 FOR VALUES FROM (101) to (200);
ALTER TABLE part DETACH PARTITION part2;
DROP TABLE part2;
ALTER TABLE part ADD PRIMARY KEY (a);
ALTER TABLE parent ALTER COLUMN a SET NOT NULL;

----
The test initially focuses on the "parent" table, then switches to the "part"
table, and goes back to the "parent" table.
This seems weird?  so I slightly adjusted the order to cover the "parent"
table first, followed by the "part" table.

src/test/modules/test_ddl_deparse/sql/alter_table.sql
don't have ALTER TABLE ALTER COLUMN SET EXPRESSION,
so I added a test on it.

Attachment

pgsql-hackers by date:

Previous
From: Srinath Reddy Sadipiralla
Date:
Subject: Re: Potential problem in commit f777d773878 and 4f7f7b03758
Next
From: Peter Smith
Date:
Subject: Re: Add support for specifying tables in pg_createsubscriber.