Re: BUG #14825: enum type: unsafe use?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: balazs@obiserver.hu, pgsql-bugs@postgresql.org,
pgsql-hackers@postgresql.org
Date: 2017-09-24T20:37:30Z
Lists: pgsql-bugs, pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes: > OK, here's the finished patch. It has a pretty small footprint all > things considered, and I think it guarantees that nothing that could be > done in this area in 9.6 will be forbidden. That's probably enough to > get us to 10 without having to revert the whole thing, ISTM, and we can > leave any further refinement to the next release. I think this could do with some more work on the comments and test cases, but it's basically sound. What we still need to debate is whether to remove the heuristic type-is-from-same-transaction test, making the user-visible behavior simply "you must commit an ALTER TYPE ADD VALUE before you can use the new value". I'm kind of inclined to do so; the fuzzy (and inadequately documented) behavior we'll have if we keep it doesn't seem very nice to me. regards, tom lane
Commits
-
Revert to 9.6 treatment of ALTER TYPE enumtype ADD VALUE.
- 28e072707685 11.0 landed
- 93a1af0b3f63 10.0 landed
-
Remove heuristic same-transaction test from check_safe_enum_use().
- 01c5de88ff24 10.0 landed
- 984c92074d84 11.0 landed
-
Use a blacklist to distinguish original from add-on enum values.
- 175774d2932d 10.0 landed
- 1635e80d30b1 11.0 landed
-
Add support for coordinating record typmods among parallel workers.
- cc5f81366c36 11.0 cited