From: | darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain) |
---|---|
To: | lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart) |
Cc: | maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian), hackers(at)postgreSQL(dot)org, paul(at)vix(dot)com |
Subject: | Re: [HACKERS] New INET and CIDR types |
Date: | 1998-10-29 13:53:05 |
Message-ID: | m0zYsVd-0000eRC@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thus spake Thomas G. Lockhart
> So, things like (don't know if this exact example is sensible):
>
> select '' as count, c as cidr from inet_tbl
> where c < '128.149.50' and c > '128.149';
Of course. I only sent in tests for the functions I added. Ok, add
the following two INSERT statements.
INSERT INTO INET_TBL (c, i) VALUES ('10', '11.1.2.3/8');
INSERT INTO INET_TBL (c, i) VALUES ('10', '9.1.2.3/8');
Then add the following query.
SELECT i, c,
i < c AS lt, i <= c AS le, i = c AS eq,
i >= c AS ge, i > c AS gt, i <> c AS ne,
i << c AS sb, i <<= c AS sbe, i >> c AS sup, i >>= c AS spe
FROM INET_TBL;
--
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Giuseppe Tanzilli | 1998-10-29 14:31:12 | beta3 compile problem |
Previous Message | D'Arcy J.M. Cain | 1998-10-29 13:15:31 | Re: [HACKERS] Bug in current network.c |