forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit84a6772
committed
Fix handling of CREATE DOMAIN with GENERATED constraint syntax
Stuff like CREATE DOMAIN foo AS int CONSTRAINT cc GENERATED ALWAYS AS (2) STOREDis not supported for domains, but the parser allows it, because it'sthe same syntax as for table constraints. But CreateDomain() did notexplicitly handle all ConstrType values, so the above would get aninternal error like ERROR: unrecognized constraint subtype: 4Fix that by providing a user-facing error message for all ConstrTypevalues. Also, remove the switch default case, so future additions toConstrType are caught.Reported-by: Jian He <jian.universality@gmail.com>Discussion:https://www.postgresql.org/message-id/CACJufxF8fmM=Dbm4pDFuV_nKGz2-No0k4YifhrF3-rjXTWJM3w@mail.gmail.com1 parent1acf105 commit84a6772
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1017 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
1018 | 1022 | | |
1019 | 1023 | | |
1020 | 1024 | | |
| |||
0 commit comments
Comments
(0)