inet/cidr - can this be done?

Поиск
Список
Период
Сортировка
От Mark Volpe
Тема inet/cidr - can this be done?
Дата
Msg-id 389337A7.3F02B63B@epamail.epa.gov
обсуждение исходный текст
Ответы Re: [SQL] inet/cidr - can this be done?  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список pgsql-sql
Is there a way to convert inet types
to cidr? I have a table with an inet
field, and it would be cool to, say,
group by class C network. My little attempt
here results in an error:

CREATE TABLE test(ip inet);
INSERT INTO test VALUES('192.168.1.2');
SELECT (host(ip) || '/24')::cidr FROM test;

ERROR:  No such function 'cidr' with the specified attributes

Thanks in advance
- Mark


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [SQL] transaction aborted
Следующее
От: root
Дата:
Сообщение: Re: [SQL] transaction aborted