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: "David E. Wheeler" <david@justatheory.com>,
Christophe Pettus <christophe.pettus@pgexperts.com>,
pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org
Date: 2017-09-26T17:18:47Z
Lists: pgsql-bugs, pgsql-hackers
I wrote: > Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes: >> OK, that seems to be the consensus. So let's apply the blacklist patch >> and then separately remove the 'created in the same transaction' test. >> We'll need to adjust the regression tests and docs accordingly. > Agreed. I'll work on that in a little bit. Pushed; sorry for the delay. I noticed that the blacklist mechanism effectively removed the prohibition against using a renamed enum value later in the same transaction, so I added a regression test for that. Also, as committed, I used RENAME TYPE rather than ALTER OWNER in the test cases requiring an updated pg_type row. That way we don't need to create a role, even a transient one, which is a good thing in terms of not risking collisions with other sessions. 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