Re: Inet type how to?

Поиск
Список
Период
Сортировка
От Alex Pilosov
Тема Re: Inet type how to?
Дата
Msg-id Pine.BSO.4.10.10006021828410.8307-100000@spider.pilosoft.com
обсуждение исходный текст
Ответ на Re: Inet type how to?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2 Jun 2000, Tom Lane wrote:

> >> 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
> understand
>     textvariable::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...

I think its a great idea. Is it just a matter of altering the catalog? Or
apparently we'd need postgres engine to know that cstring is a special
type and instead of looking for conversion routines it should use xxx_in
and yyy_out

I like it in any case. Last ditch do-not-use-unless-you-sure-its-what you
want thingy...

-alex



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inet type how to?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Problems with recent CVS versions and Solaris.