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" <dkressin@globalcrossing.com>)
Список pgsql-general
"Daniel J. Kressin" <dkressin@globalcrossing.com> 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