Curious result from text ( netmask ( inet ) ) functions.

Поиск
Список
Период
Сортировка
Искать

Curious result from text ( netmask ( inet ) ) functions.

От:
"Vadim I. Passynkov" <pvi@axxent.ca>
Дата:
spidermon=# SELECT version();
                           version                            
--------------------------------------------------------------
 PostgreSQL 7.1.2 on i386--freebsd4.3, compiled by GCC 2.95.3
(1 row)

spidermon=# SELECT netmask ( '192.168.1.1/28' ) ;
     netmask     
-----------------
 255.255.255.240
(1 row)

spidermon=# SELECT text ( netmask ( '192.168.1.1/28' ) );
        text        
--------------------
 255.255.255.240/32 - ??????
(1 row)

-- 

 Vadim I. Passynkov, Axxent Corp.
 mailto:pvi@axxent.ca

Re: Curious result from text ( netmask ( inet ) ) functions.

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Vadim I. Passynkov"  writes:
> spidermon=# SELECT text ( netmask ( '192.168.1.1/28' ) );
>         text        
> --------------------
>  255.255.255.240/32 - ??????
> (1 row)

That's what it's defined to do.  See 
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/functions-net.html

			regards, tom lane
FAQ