CREATE CAST requires immutable cast function?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: CREATE CAST requires immutable cast function?
Date: 2002-09-01 02:42:00
Message-ID: 16732.1030848120@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-01 02:45:00 Re: CREATE CAST requires immutable cast function?
Previous Message Bruce Momjian 2002-09-01 01:32:09 Re: Current status: implicit-coercion issues for 7.3