From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | minor refactor on src/test/modules/test_ddl_deparse/sql/alter_table.sql |
Date: | 2025-08-25 00:00:00 |
Message-ID: | CACJufxFDi7fnwB-8xXd_ExML7-7pKbTaK4j46AJ=4-14DXvtVg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
v1-0001-refactor-test_ddl_deparse-sql-alter_table.sql.patch | text/x-patch | 5.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2025-08-25 00:08:09 | Re: Add support for specifying tables in pg_createsubscriber. |
Previous Message | Srinath Reddy Sadipiralla | 2025-08-24 23:46:15 | Re: Potential problem in commit f777d773878 and 4f7f7b03758 |