Skip site navigation (1) Skip section navigation (2)

Re: Repair plan for inet and cidr types

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Repair plan for inet and cidr types
Date: 2000-07-05 02:19:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Thus spake Peter Eisentraut
> network and a host are not the same thing. To construct a cidr value from
> an inet value, you'd have to use some sort of (to be created) network()
> function, e.g., network('') => '127.0/16'. IMO, there is no

Oh, I forgot to mention:

darcy=> select network(''::inet);
(1 row)

There is also a host and netmask function and note:

darcy=> select host(''::cidr);
ERROR:  CIDR type has no host part

But I still see no reason why that can't be implicit if we assign the
"''::inet" value to a cidr.  In other words let "select
(''::inet)::cidr" give the same output.

D'Arcy J.M. Cain <darcy(at){druid|vex}.net>   |  Democracy is three wolves                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

In response to

pgsql-hackers by date

Next:From: Chris BitmeadDate: 2000-07-05 02:24:12
Subject: Re: Article on MySQL vs. Postgres
Previous:From: Tom LaneDate: 2000-07-05 02:13:08
Subject: Re: Dumping SQL type names

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group