Skip site navigation (1) Skip section navigation (2)

classful cidr insertion bug?

From: Paul Schultz <pschultz(at)pschultz(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: classful cidr insertion bug?
Date: 2002-06-17 00:35:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
I'm running into an issue that contradicts how pgsql should behave
according to the documentation.  Running 7.2.1 .deb package.

For the cidr data type it says an insertion missing the subnet bits should
be handled like legacy classful networks.  ie if I insert just
'' it should be handled as ''.  I'm seeing it get
inserted as ''.

If i insert using for example '172.16' it works and inserts as a /16, so
does classful insertion only work when inputting with an abbreviated
network (and why the choice to have it restricted like that)?  The data
being stored is essentially a selective parsing of an  entire BGP table
from a Cisco router, so legacy class a/b/c space with  8/16/24 bit
netmasks respectively show up without the prefix length bits.

niara=# \d prefixes
                                     Table "prefixes"
  Column   |          Type          |                      Modifiers
 prefix    | cidr                   |
 aspath    | character varying(200) |
 origin_as | integer                |
 id        | integer                | not null default
Unique keys: prefixes_id_key

niara=# insert into prefixes values ('', '10913 1239 1 i', '1');
INSERT 415033 1
niara=# select prefix from prefixes where prefix = '';
(1 row)


Paul Schultz


pgsql-bugs by date

Next:From: Tom LaneDate: 2002-06-17 03:27:39
Subject: Re: classful cidr insertion bug?
Previous:From: Tomoyuki NiijimaDate: 2002-06-16 12:14:14
Subject: Apache 1.3.19 could not load of PostgreSQL 7.2.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group