forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit499c81d
committed
Prohibit a column from appearing twice in a PRIMARY KEY or UNIQUE
constraint. This case (a) is useless, (b) violates SQL92, and(c) is certain to cause a failure downstream when we try to createan index with duplicated column names. So give an appropriate errormessage instead of letting the index failure occur. Per report fromColin Strickland. NOTE: currently, CREATE INDEX fooi ON foo(f1,f1)still fails with 'cannot insert duplicate key' error. Should wechange that too? What about functional indexes?1 parent5621ec0 commit499c81d
1 file changed
+14
-3
lines changedLines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
954 | 954 |
| |
955 | 955 |
| |
956 | 956 |
| |
957 |
| - | |
958 |
| - | |
| 957 | + | |
| 958 | + | |
959 | 959 |
| |
960 | 960 |
| |
961 | 961 |
| |
| |||
1057 | 1057 |
| |
1058 | 1058 |
| |
1059 | 1059 |
| |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1060 | 1071 |
| |
1061 | 1072 |
| |
1062 | 1073 |
| |
|
0 commit comments
Comments
(0)