Re: [HACKERS] Re: hackers-digest V1 #1013

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] Re: hackers-digest V1 #1013
Date: 1998-10-10 16:32:13
Message-ID: m0zS1wD-0000f4C@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thus spake Tom Lane
> darcy(at)druid(dot)net (D'Arcy J.M. Cain) writes:
> > Based on the discussions we had earlier I am surprised by the
> > following.
>
> > darcy=> select '198.1.2.3/8'::inet;
> > ?column?
> > --------
> > 198/8
> > (1 row)
>
> > I would have expected it to print what I entered.
>
> Why? You told it to truncate the data to 8 bits, so it did. (At least,
> that's my understanding of what the /n notation means, but maybe I'm
> mistaken.)

As I explained, I was surprised based on my understanding of the type
based on previous postings.

BTW, for a real world example of the usage I was expecting, look at an
Ascend router. In a connection profile you can specify an IP for the
remote side as, e.g., 198.96.119.225/28. The Ascend pulls out all
the information it needs to set up that connection. It assigns
198.96.119.225 to the remote host, it routes the 16 addresses in that
subnet to that interface and, if RIP is enabled (a bad idea but allowed)
then it knows to announce on 198.96.119.239.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Ivar Helbekkmo 1998-10-10 18:14:51 Re: [HACKERS] Open 6.4 items
Previous Message D'Arcy J.M. Cain 1998-10-10 15:58:37 Permissions not working?