pgsql.hackers
[Top] [All Lists]

Re: User defined I/O conversion casts

Subject: Re: User defined I/O conversion casts
From: Teodor Sigaev
Date: Fri, 29 Aug 2008 15:50:44 +0400
Newsgroups: pgsql.hackers



Since 8.3, the system provides automatic I/O conversion casts between the built-in string types and other types, but there's currently no way for a user to declare additional casts using the I/O functions. You can always create a simple SQL function to do that, but it seems like we should provide a direct interface for that. I propose the syntax:

CREATE CAST (<source> AS <target>) WITH INOUT [AS IMPLICIT | AS ASSIGNMENT]

Anyone else think this is a good idea? Thoughts on the implementation?

Agree, that task causes too often for me. Although using separate boolean column looks more preferable than special value for OID.

--
Teodor Sigaev                                   E-mail: teodor@xxxxxxxxx
                                                   WWW: http://www.sigaev.ru/

--
Sent via pgsql-hackers mailing list (pgsql-hackers@xxxxxxxxxxxxxx)
To make changes to your subscription:
                                www.postgresql.org/mailpref/pgsql-hackers">http://www.postgresql.org/mailpref/pgsql-hackers


<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy