forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit449e798
committed
Introduce sequence_*() access functions
Similarly to tables and indexes, these functions are able to openrelations with a sequence relkind, which is useful to make a distinctionwith the other relation kinds. Previously, commands/sequence.c used amix of table_{close,open}() and relation_{close,open}() routines whenmanipulating sequence relations, so this clarifies the code.A direct effect of this change is to align the error messages producedwhen attempting DDLs for sequences on relations with an unexpectedrelkind, like a table or an index with ALTER SEQUENCE, providing anextra error detail about the relkind of the relation used in the DDLquery.Author: Michael PaquierReviewed-by: Tomas VondraDiscussion:https://postgr.es/m/ZWlohtKAs0uVVpZ3@paquier.xyz1 parent025f0a6 commit449e798
File tree
8 files changed
+140
-20
lines changed- src
- backend
- access
- sequence
- commands
- include/access
- test/regress/expected
8 files changed
+140
-20
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| 12 | + | |
12 | 13 |
| |
13 | 14 |
| |
14 | 15 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + |
Lines changed: 78 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + |
Lines changed: 13 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
211 |
| - | |
| 212 | + | |
212 | 213 |
| |
213 | 214 |
| |
214 | 215 |
| |
| |||
219 | 220 |
| |
220 | 221 |
| |
221 | 222 |
| |
222 |
| - | |
| 223 | + | |
223 | 224 |
| |
224 | 225 |
| |
225 | 226 |
| |
| |||
324 | 325 |
| |
325 | 326 |
| |
326 | 327 |
| |
327 |
| - | |
| 328 | + | |
328 | 329 |
| |
329 | 330 |
| |
330 | 331 |
| |
| |||
531 | 532 |
| |
532 | 533 |
| |
533 | 534 |
| |
534 |
| - | |
| 535 | + | |
535 | 536 |
| |
536 | 537 |
| |
537 | 538 |
| |
| |||
555 | 556 |
| |
556 | 557 |
| |
557 | 558 |
| |
558 |
| - | |
| 559 | + | |
559 | 560 |
| |
560 | 561 |
| |
561 | 562 |
| |
| |||
662 | 663 |
| |
663 | 664 |
| |
664 | 665 |
| |
665 |
| - | |
| 666 | + | |
666 | 667 |
| |
667 | 668 |
| |
668 | 669 |
| |
| |||
849 | 850 |
| |
850 | 851 |
| |
851 | 852 |
| |
852 |
| - | |
| 853 | + | |
853 | 854 |
| |
854 | 855 |
| |
855 | 856 |
| |
| |||
880 | 881 |
| |
881 | 882 |
| |
882 | 883 |
| |
883 |
| - | |
| 884 | + | |
884 | 885 |
| |
885 | 886 |
| |
886 | 887 |
| |
| |||
915 | 916 |
| |
916 | 917 |
| |
917 | 918 |
| |
918 |
| - | |
| 919 | + | |
919 | 920 |
| |
920 | 921 |
| |
921 | 922 |
| |
| |||
1030 | 1031 |
| |
1031 | 1032 |
| |
1032 | 1033 |
| |
1033 |
| - | |
| 1034 | + | |
1034 | 1035 |
| |
1035 | 1036 |
| |
1036 | 1037 |
| |
| |||
1095 | 1096 |
| |
1096 | 1097 |
| |
1097 | 1098 |
| |
1098 |
| - | |
| 1099 | + | |
1099 | 1100 |
| |
1100 | 1101 |
| |
1101 | 1102 |
| |
| |||
1152 | 1153 |
| |
1153 | 1154 |
| |
1154 | 1155 |
| |
1155 |
| - | |
1156 |
| - | |
1157 |
| - | |
1158 |
| - | |
1159 |
| - | |
1160 |
| - | |
1161 | 1156 |
| |
1162 | 1157 |
| |
1163 | 1158 |
| |
| |||
1803 | 1798 |
| |
1804 | 1799 |
| |
1805 | 1800 |
| |
1806 |
| - | |
| 1801 | + | |
1807 | 1802 |
| |
1808 | 1803 |
| |
1809 | 1804 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + |
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
313 | 313 |
| |
314 | 314 |
| |
315 | 315 |
| |
316 |
| - | |
| 316 | + | |
| 317 | + | |
317 | 318 |
| |
318 | 319 |
| |
319 | 320 |
| |
|
0 commit comments
Comments
(0)