Re: Inet type how to? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inet type how to?
Date
Msg-id 17130.959984687@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inet type how to?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Inet type how to?
List pgsql-hackers
>> None works. I tried. There is no type that can be cast to inet. And
>> inet_in has a different calling sequence, and you can't really use that.

> Added to TODO.

If we had "C string" (or something like that) as a genuine type in the
type system, then it would be possible/reasonable for the parser to
understandtextvariable::cstring::inet
as a request to invoke text_out followed by inet_in.

I think it'd be a real bad idea to invoke such conversions silently,
since then we'd essentially have no type system at all (you could get
from anything to anything else via cstring, so how can the thing check
for errors?).  But it'd be awful darn handy to be able to invoke the
type i/o routines explicitly...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: config files in /data
Next
From: Alex Pilosov
Date:
Subject: Re: Inet type how to?