forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit984c920
committed
Remove heuristic same-transaction test from check_safe_enum_use().
The blacklist mechanism added by the preceding commit directly fixesmost of the practical cases that the same-transaction test was meantto cover. What remains is use-cases likebegin;create type e as enum('x');alter type e add value 'y';-- use 'y' somehowcommit;However, because the same-transaction test is heuristic, it fails onsmall variants of that, such as renaming the type or changing itsowner. Rather than try to explain the behavior to users, let'sremove it and just have a rule that the newly added value can't beused before being committed, full stop. Perhaps later it will beworth the implementation effort and overhead to have a more accuratetest for type-was-created-in-this-transaction. We'll wait for somefield experience with v10 before deciding to do that.Back-patch to v10.Discussion:https://postgr.es/m/20170922185904.1448.16585@wrigleys.postgresql.org1 parent1635e80 commit984c920
File tree
4 files changed
+24
-49
lines changed- doc/src/sgml/ref
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+24
-49
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 |
| - | |
296 |
| - | |
| 295 | + | |
297 | 296 |
| |
298 | 297 |
| |
299 | 298 |
| |
|
Lines changed: 9 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 |
| |
53 | 60 |
| |
54 | 61 |
| |
| |||
58 | 65 |
| |
59 | 66 |
| |
60 | 67 |
| |
61 |
| - | |
62 | 68 |
| |
63 | 69 |
| |
64 | 70 |
| |
| |||
85 | 91 |
| |
86 | 92 |
| |
87 | 93 |
| |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 | 94 |
| |
119 | 95 |
| |
120 | 96 |
| |
121 | 97 |
| |
| 98 | + | |
122 | 99 |
| |
123 | 100 |
| |
124 | 101 |
| |
|
Lines changed: 8 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
656 | 656 |
| |
657 | 657 |
| |
658 | 658 |
| |
659 |
| - | |
660 |
| - | |
| 659 | + | |
| 660 | + | |
661 | 661 |
| |
662 | 662 |
| |
663 |
| - | |
664 |
| - | |
665 |
| - | |
666 |
| - | |
667 |
| - | |
668 |
| - | |
669 |
| - | |
670 |
| - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
671 | 669 |
| |
672 | 670 |
| |
673 | 671 |
| |
|
Lines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
315 | 315 |
| |
316 | 316 |
| |
317 | 317 |
| |
318 |
| - | |
319 |
| - | |
| 318 | + | |
| 319 | + | |
320 | 320 |
| |
321 | 321 |
| |
322 |
| - | |
323 |
| - | |
324 |
| - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
325 | 326 |
| |
326 | 327 |
| |
327 | 328 |
| |
|
0 commit comments
Comments
(0)