pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Feature, my misconception or bug??
6+ messages / 3 participants
[nested] [flat]

* Feature, my misconception or bug??
@ 2006-02-22 12:04 Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2006-02-22 12:47 ` Re: Feature, my misconception or bug?? Peter Eisentraut <peter_e@gmx.net>
  2006-02-22 12:56 ` Re: Feature, my misconception or bug?? Markus Schaber <schabi@logix-tt.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Achilleus Mantzios @ 2006-02-22 12:04 UTC (permalink / raw)
  To: pgsql-sql


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 
11111111.11111111.11111111.11111111 
has no bits set to right of
                     8 LSB ^
??
-- 
-Achilleus




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Feature, my misconception or bug??
  2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
@ 2006-02-22 12:47 ` Peter Eisentraut <peter_e@gmx.net>
  2006-02-22 12:55   ` Re: Feature, my misconception or bug?? Markus Schaber <schabi@logix-tt.com>
  2006-02-22 16:31   ` Re: Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 2 replies; 6+ messages in thread

From: Peter Eisentraut @ 2006-02-22 12:47 UTC (permalink / raw)
  To: pgsql-sql; +Cc: Achilleus Mantzios <achill@matrix.gatewaynet.com>

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
> 11111111.11111111.11111111.11111111
> 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/



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Feature, my misconception or bug??
  2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2006-02-22 12:47 ` Re: Feature, my misconception or bug?? Peter Eisentraut <peter_e@gmx.net>
@ 2006-02-22 12:55   ` Markus Schaber <schabi@logix-tt.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Markus Schaber @ 2006-02-22 12:55 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-sql@postgresql.org, Achilleus Mantzios <achill@matrix.gatewaynet.com>

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
>>11111111.11111111.11111111.11111111
>>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 Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Feature, my misconception or bug??
  2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2006-02-22 12:47 ` Re: Feature, my misconception or bug?? Peter Eisentraut <peter_e@gmx.net>
@ 2006-02-22 16:31   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Achilleus Mantzios @ 2006-02-22 16:31 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-sql

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
> > 11111111.11111111.11111111.11111111
> > 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 11111111.11111111.11111111.11111111 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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Feature, my misconception or bug??
  2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
@ 2006-02-22 12:56 ` Markus Schaber <schabi@logix-tt.com>
  2006-02-23 09:03   ` Re: Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Markus Schaber @ 2006-02-22 12:56 UTC (permalink / raw)
  To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql

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 Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Feature, my misconception or bug??
  2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2006-02-22 12:56 ` Re: Feature, my misconception or bug?? Markus Schaber <schabi@logix-tt.com>
@ 2006-02-23 09:03   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Achilleus Mantzios @ 2006-02-23 09:03 UTC (permalink / raw)
  To: Markus Schaber <schabi@logix-tt.com>; +Cc: pgsql-sql

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.5...

> 
> HTH,
> Markus
> 
> 
> 

-- 
-Achilleus




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-02-23 09:03 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 12:04 Feature, my misconception or bug?? Achilleus Mantzios <achill@matrix.gatewaynet.com>
2006-02-22 12:47 ` Peter Eisentraut <peter_e@gmx.net>
2006-02-22 12:55   ` Markus Schaber <schabi@logix-tt.com>
2006-02-22 16:31   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2006-02-22 12:56 ` Markus Schaber <schabi@logix-tt.com>
2006-02-23 09:03   ` Achilleus Mantzios <achill@matrix.gatewaynet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox