Re: inet type and network()

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: inet type and network()
Дата
Msg-id
12640.984630030@sss.pgh.pa.us
Ответ на
inet type and network() (Daniel J. Kressin)
Список
Дерево обсуждения
inet type and network() "Daniel J. Kressin" <dkressin@globalcrossing.com>
Re: inet type and network() Tom Lane <tgl@sss.pgh.pa.us>
"Daniel J. Kressin"  writes:
> The .0s get dropped.  Is there a way to force it to leave the .0s
> attached?

In 7.1 the default display of inet values is the way you want it.

In 7.0 I think you have to use brute force:

play=> select host('192.168.1.0/22'::inet) || '/' || masklen('192.168.1.0/22'::inet);
    ?column?
----------------
 192.168.1.0/22
(1 row)

			regards, tom lane
В списке pgsql-general по дате отправления
От: Daniel J. Kressin
Дата:
Сообщение: inet type and network()
От: Aristide Aragon
Дата:
Сообщение: Gupta
FAQ