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

Re: [BUGS] Bug in create operator and/or initdb

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] Bug in create operator and/or initdb
Date: 2005-01-31 19:35:58
Message-ID: 87acqpqtlt.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

>  steve=# select '224.0.0.0'::cidr;
>       cidr     
>   -------------
>    224.0.0.0/4
> 
> which should be /32 according to what the docs say:

224-239 are multicast addresses. Making it /4 makes the entire multicast
address space one network block which is about as reasonable an answer as
anything else.

>         if (bits >= 8 && bits < ((dst - odst) * 8))
>             ^^^^^^^^^
>             bits = (dst - odst) * 8;
>     }
> 
> I think the test for "bits >= 8" should be removed.  Does anyone know
> why it's there?

I guess Vixie figured network blocks subdividing multicast address space
weren't a sensible concept? It's a bit of a strange constraint to hard code
into the C code though.

Incidentally, how can that code possibly work? It treats odst as a pointer in
some places but then calculates bits using arithmetic on it directly without
dereferencing?

-- 
greg


In response to

pgsql-hackers by date

Next:From: operationsengineer1Date: 2005-01-31 19:36:11
Subject: Re: Last ID Problem
Previous:From: Manfred KoizarDate: 2005-01-31 19:35:25
Subject: Re: Group-count estimation statistics

pgsql-bugs by date

Next:From: Dave PageDate: 2005-01-31 21:21:56
Subject: Re: Template1 is locked when pgAdminIII is open
Previous:From: Matthew WakelingDate: 2005-01-31 18:19:24
Subject: Bad planner decision in Postgres

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