[SQL] Feature, my misconception or bug??
In PgSQL 7.4.12, foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. foodb=# SELECT '255.255.255.255/25'::cidr; cidr 255.255.255.255/25 (1 row) foodb=# in this case ... has no bits set to right of 8 LSB ^ ?? -- -Achilleus ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [SQL] Feature, my misconception or bug??
Am Mittwoch, 22. Februar 2006 13:04 schrieb Achilleus Mantzios: foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. in this case ... has no bits set to right of 8 LSB ^ I'm sure you are aware that 1 is a set bit, so which part are you not understanding? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] Feature, my misconception or bug??
Hi, Peter, Peter Eisentraut wrote: Am Mittwoch, 22. Februar 2006 13:04 schrieb Achilleus Mantzios: foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. in this case ... has no bits set to right of 8 LSB ^ I'm sure you are aware that 1 is a set bit, so which part are you not understanding? I guess he's confused by the fact that /24 complains about bits 25-31 beeing set, while /25 does not complain aobut bigs 26-31 beeing set. HTH, Markus -- Markus Schaber | Logical TrackingTracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] Feature, my misconception or bug??
Achilleus Mantzios wrote: In PgSQL 7.4.12, foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. foodb=# SELECT '255.255.255.255/25'::cidr; cidr 255.255.255.255/25 (1 row) This one is refused in 8.1, so I guess that's a fixed bug. HTH, Markus -- Markus Schaber | Logical TrackingTracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] Feature, my misconception or bug??
O Peter Eisentraut έγραψε στις Feb 22, 2006 : Am Mittwoch, 22. Februar 2006 13:04 schrieb Achilleus Mantzios: foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. in this case ... has no bits set to right of 8 LSB ^ In the above statement there was a ?, which is missing here. It should read: in this case ... has no bits set to right of 8th Least Significant Bit??? (with a ^ showing the position where the mask ends, making it obviously visible to the ones who use text base MUAs in fixed width font terminals). In other words, why doesnt the system produce an error for the second query as well??? I'm sure you are aware that 1 is a set bit, so which part are you not understanding? Others (Marcus) have reported that the second query SELECT '255.255.255.255/25'::cidr; indeed produces an error in 8.1; so i guess its a bug in the 7.4.x series. -- -Achilleus ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [SQL] Feature, my misconception or bug??
O Markus Schaber έγραψε στις Feb 22, 2006 : Achilleus Mantzios wrote: In PgSQL 7.4.12, foodb=# SELECT '255.255.255.255/24'::cidr; ERROR: invalid cidr value: 255.255.255.255/24 DETAIL: Value has bits set to right of mask. foodb=# SELECT '255.255.255.255/25'::cidr; cidr 255.255.255.255/25 (1 row) This one is refused in 8.1, so I guess that's a fixed bug. Thanx Marcus, it appears to have been fixed in http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/network.c.diff?r1=1.53;r2=1.54;f=h HTH, Markus -- -Achilleus ---(end of broadcast)--- TIP 6: explain analyze is your friend