Re: Summary: what to do about INET/CIDR

Поиск
Список
Период
Сортировка
От Larry Rosenman
Тема Re: Summary: what to do about INET/CIDR
Дата
Msg-id 20001027111352.A5543@lerami.lerctr.org
обсуждение исходный текст
Ответ на Summary: what to do about INET/CIDR  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Summary: what to do about INET/CIDR  (Alex Pilosov <alex@pilosoft.com>)
Список pgsql-hackers
* Larry Rosenman <ler@lerctr.org> [001027 11:08]:
> * Tom Lane <tgl@sss.pgh.pa.us> [001027 09:49]:
> > Larry Rosenman <ler@lerctr.org> writes:
> > > Also a way to get network (.0) and broadcast (all ones) for a cidr
> > > block out of our stuff. 
> > 
> > network() and broadcast() have been there all along ...
> OK, what I really meant was a way to coerce a CIDR entity to INET so 
> that host() can work with a CIDR type to print all 4 octets. 
> 
> Does this help with what I want?  
> 
> Currently you can't coerce a CIDR type to INET. 
For example, I feel the following should work:

ler=# \d ler_test     Table "ler_test"Attribute | Type | Modifier
-----------+------+----------net       | cidr |host      | inet |

ler=# select * from ler_test;     net      |       host
---------------+------------------207.158.72/24 | 207.158.72.11/24
(1 row)

ler=# select host(net::inet) from ler_test;
ERROR:  CIDR type has no host part
ERROR:  CIDR type has no host part
ler=#
> 
> > 
> >             regards, tom lane
> -- 
> Larry Rosenman                      http://www.lerctr.org/~ler
> Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql/src/backend/nodes (copyfuncs.c outfuncs.c print.c)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] 7.0 vs. 7.1 (was: latest version?)