Re: [HACKERS] Re: hackers-digest V1 #1013
От | darcy@druid.net (D'Arcy J.M. Cain) |
---|---|
Тема | Re: [HACKERS] Re: hackers-digest V1 #1013 |
Дата | |
Msg-id | m0zS1wD-0000f4C@druid.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: hackers-digest V1 #1013 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Thus spake Tom Lane > darcy@druid.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@{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.
В списке pgsql-hackers по дате отправления: