Re: User defined I/O conversion casts - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: User defined I/O conversion casts
Date
Msg-id 48B817FE.6030906@enterprisedb.com
Whole thread Raw
In response to Re: User defined I/O conversion casts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Patch attached. I'm using a magic OID "1" in pg_cast.castfunc field to
>> mark these extra I/O conversion casts.
> 
> Ugh.  That's really unacceptable (doesn't it make the oidjoins
> regression test fail?),

Yeah, it does if you create a cast like that. And pg_dump/restore will 
need to be taught about it as well.

> I think that as things stand at the moment, you can get I/O conversion
> casts to work for a user-defined type by making it be of string
> category.  Maybe that would be an easier way to get the effect.

Hmm. That would be sensible only for types that are, well, strings. Not 
if you wanted to make the cast from, say, int4 to text implicit.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: New FSM allocation policy
Next
From: Heikki Linnakangas
Date:
Subject: Re: New FSM allocation policy