On Aug 20, 2013, at 6:50 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > You need more parentheses -- (source::text) would've worked.
Alas, no, same problem as for CAST(): ERROR: functions in index expression must be marked IMMUTABLE >> No problem, I can use CAST(), right? So I try: >> EXCLUDE USING gist (CAST(source AS text) WITH =, within WITH &&) >> Not so much: >> try.sql:13: ERROR: functions in index expression must be marked IMMUTABLE >> I guess it's because locale settings might change, and therefore change the >> text representation? Seems unlikely, though. > > Not locale, just renaming one of the values would be enough to break that. > Admittedly we don't provide an official way to do that ATM, but you can do > an UPDATE on pg_enum. Ah, right. Maybe if there was a way to get at some immutable numeric value… Thanks, David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers