Skip site navigation (1) Skip section navigation (2)

Re: User defined I/O conversion casts

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User defined I/O conversion casts
Date: 2008-10-30 13:31:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
(Resurrecting an old thread.)

Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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, a magical OID clearly has some issues. A new field in pg_cast is 
the obvious alternative. How about adding a "castmethod" char field, 
with values:
b = binary-compatible cast (CREATE CAST ... WITHOUT FUNCTION)
i = I/O coercion cast (the new beast, CREATE CAST ... WITH INOUT)
f = use cast function specified in castfunc field.

castfunc is 0 for methods b and i.

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-10-30 13:37:37
Subject: Re: User defined I/O conversion casts
Previous:From: Tom LaneDate: 2008-10-30 13:29:33
Subject: Re: Optimizing COPY

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group