Re: converting from text -> inet ... possible?

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: converting from text -> inet ... possible?
Дата
Msg-id 3A67481E.61D5BF6A@tm.ee
обсуждение исходный текст
Ответ на converting from text -> inet ... possible?  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
The Hermit Hacker wrote:
> 
> I scanned the archives, and one person asked it back in July, but there
> doesn't appear to be any followup ...
> 
> Is it possible to go from text->inet in v7.0.3?  if not, is it in v7.1?
> 
> the following doesn't work:
> 
> template1=# select '216.126.84.1'::text::inet;
> ERROR:  Cannot cast type 'text' to 'inet'

You could use something like that:
hannu=# select  inet_in(textout('127.0.0.1/24'::text)) as n;     n       
--------------127.0.0.1/24
(1 row)
-------------------------------
Hannu


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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: copy from stdin; bug?
Следующее
От: "wenjin.zheng"
Дата:
Сообщение: Gateway