forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit13daa33
committed
Disallow NO INHERIT not-null constraints on partitioned tables
Such constraints are semantically useless and only bring weird casesalong, so reject them.As a side effect, we can no longer have "throwaway" constraints inpg_dump for primary keys in partitioned tables, but since they don'tserve any useful purpose, we can just omit them.Maybe this should be done for all types of constraints, but it's justnot-null ones that acquired this "ability" in the 17 timeframe, so forthe moment I'm not changing anything else.Per note by Alexander Lakhin.Discussion:https://postgr.es/m/7d923a66-55f0-3395-cd40-81c142b5448b@gmail.com1 parenta27ccc2 commit13daa33
File tree
4 files changed
+33
-2
lines changed- src
- backend/parser
- bin/pg_dump
- test/regress
- expected
- sql
4 files changed
+33
-2
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
679 | 679 |
| |
680 | 680 |
| |
681 | 681 |
| |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
682 | 686 |
| |
683 | 687 |
| |
684 | 688 |
| |
| |||
969 | 973 |
| |
970 | 974 |
| |
971 | 975 |
| |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
972 | 982 |
| |
973 | 983 |
| |
974 | 984 |
| |
|
Lines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9052 | 9052 |
| |
9053 | 9053 |
| |
9054 | 9054 |
| |
9055 |
| - | |
| 9055 | + | |
| 9056 | + | |
| 9057 | + | |
| 9058 | + | |
| 9059 | + | |
| 9060 | + | |
| 9061 | + | |
| 9062 | + | |
| 9063 | + | |
9056 | 9064 |
| |
9057 | 9065 |
| |
9058 | 9066 |
| |
| |||
9092 | 9100 |
| |
9093 | 9101 |
| |
9094 | 9102 |
| |
9095 |
| - | |
| 9103 | + | |
| 9104 | + | |
| 9105 | + | |
| 9106 | + | |
| 9107 | + | |
9096 | 9108 |
| |
9097 | 9109 |
| |
9098 | 9110 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
324 | 329 |
| |
325 | 330 |
| |
326 | 331 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 |
| |
216 | 220 |
| |
217 | 221 |
| |
|
0 commit comments
Comments
(0)