CREATE CAST requires immutable cast function? - Mailing list pgsql-hackers

From Tom Lane
Subject CREATE CAST requires immutable cast function?
Date
Msg-id 16732.1030848120@sss.pgh.pa.us
Whole thread Raw
Responses Re: CREATE CAST requires immutable cast function?
Re: CREATE CAST requires immutable cast function?
List pgsql-hackers
It says here that CREATE CAST insists the cast function be immutable.
This seems wrong to me, in view of the fact that we have numerous
built-in casts that don't adhere to that rule --- for example,
timestamptz(date) is not immutable because it depends on the timezone
setting.

Perhaps there's a case for prohibiting volatile casts (as opposed to
stable ones), but I don't really see it.  I'd prefer to just remove
this restriction.  Comments?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Current status: implicit-coercion issues for 7.3
Next
From: Bruce Momjian
Date:
Subject: Re: CREATE CAST requires immutable cast function?