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

Re: Status of Fix Domain Casting TODO

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Status of Fix Domain Casting TODO
Date: 2007-01-02 10:14:34
Message-ID: 20070102101433.GB71246@nasby.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Jan 01, 2007 at 06:30:40PM -0600, Andrew Dunstan wrote:
> Tom Lane wrote:
> > "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> >> FWIW, I'm running into this trying to create a 'raw' domain that would
> >> automagically convert hex strings into actual binary data for storage in
> >> a bytea.
> >
> > I think you've got 0 chance of implementing that as a domain rather than
> > an independent type.  Without or without revisions in the casting rules,
> > a domain has not got its own I/O functions, and never will.
> 
> 
> This might be less of an issue if we allowed such IO functions to be
> written in a loadable PL rather than in C.

I'm confused... couldn't I just write a cast function? Or is that what's
meant by I/O functions?

And yes, in this case I should be able to accomplish what I'm looking
for just using encode() and decode().
-- 
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2007-01-02 10:35:34
Subject: Re: Reverse-sort indexes and NULLS FIRST/LAST sorting
Previous:From: Martijn van OosterhoutDate: 2007-01-02 10:08:52
Subject: Re: Reverse-sort indexes and NULLS FIRST/LAST sorting

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