Re: CAST Within EXCLUSION constraint - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CAST Within EXCLUSION constraint
Date
Msg-id 4022.1377094395@sss.pgh.pa.us
Whole thread Raw
In response to Re: CAST Within EXCLUSION constraint  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: CAST Within EXCLUSION constraint
Re: CAST Within EXCLUSION constraint
List pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> It seems reasonable to me to cast enum to oid. However, creating casts
> without function isn't allowed for enums.

> test=# create cast (source as oid) without function;
> ERROR:  enum data types are not binary-compatible

The reason for that is you'd get randomly different results on another
installation.  In this particular application, I think David doesn't
really care about what values he gets as long as they're distinct,
so this might be an OK workaround for him.  But that's the reasoning
for the general prohibition.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: PL/pgSQL, RAISE and error context
Next
From: Tom Lane
Date:
Subject: Re: PL/pgSQL, RAISE and error context