You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add some regression tests for missing DDL patterns
The following commands gain increased coverage for some of the errors
they can trigger:
- ALTER TABLE .. ALTER COLUMN
- CREATE DOMAIN
- CREATE TYPE (LIKE)
This has come up while discussing the possibility to add more
information about the location of the error in such queries, and it
is useful on its own as there was no coverage until now for the
patterns added in this commit.
Author: Jian He, Kirill Reshke
Reviewed-By: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/CALdSSPhqfvKbDwqJaY=yEePi_aq61GmMpW88i6ZH7CMG_2Z4Cg@mail.gmail.com
Copy file name to clipboardExpand all lines: src/test/regress/sql/alter_table.sql
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2145,6 +2145,11 @@ ALTER TABLE comment_test ALTER COLUMN id SET DATA TYPE text;
2145
2145
ALTERTABLE comment_test ALTER COLUMN positive_col SET DATA TYPE int;
2146
2146
ALTERTABLE comment_test ALTER COLUMN positive_col SET DATA TYPE bigint;
2147
2147
2148
+
-- Some error cases.
2149
+
ALTERTABLE comment_test ALTER COLUMN xmin SET DATA TYPE x;
2150
+
ALTERTABLE comment_test ALTER COLUMN id SET DATA TYPE x;
2151
+
ALTERTABLE comment_test ALTER COLUMN id SET DATA TYPE int COLLATE "C";
2152
+
2148
2153
-- Check that the comments are intact.
2149
2154
SELECT col_description('comment_test'::regclass, 1) as comment;
2150
2155
SELECT indexrelid::regclass::textas index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid ='comment_test'::regclass ORDER BY1, 2;
0 commit comments