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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-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

Browse pgsql-bugs by date

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

Browse pgsql-hackers by date

  From Date Subject
Next Message operationsengineer1 2005-01-31 19:36:11 Re: Last ID Problem
Previous Message Manfred Koizar 2005-01-31 19:35:25 Re: Group-count estimation statistics