| 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:46:18 |
| Message-ID: | 4909BAAA.6040509@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> 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.
>
> Seems sane to me. If you do that, please add a check in the opr_sanity
> regression test that castfunc is nonzero if and only if castmethod is f.
Ok, will do.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2008-10-30 13:48:54 | Re: Please make sure your patches are on the wiki page |
| Previous Message | Tom Lane | 2008-10-30 13:37:37 | Re: User defined I/O conversion casts |