On 12/19/2012 11:31 AM, Tom Lane wrote:
enum_add is all right as long as you are careful to commit its
transaction before inserting the new value anywhere.

                        

It's not really all right for post-9.0 versions. For example, this is wrong:

    --postgres 9.2 or higher
    IF version_int > 90200 THEN


It should really be "IF version_int >= 90100 THEN"

what is even worse is that this procedure doesn't take any care at all of the ordering rule for even numbered enum oids. We could have oid wraparound to an even numbered oid and it would break the rule.

cheers

andrew



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to