Re: column ordering, was Re: [PATCHES] Enums patch v2

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Kenneth Marshall <ktm(at)is(dot)rice(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Gregory Stark <stark(at)enterprisedb(dot)com>
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2
Date: 2006-12-20 14:11:48
Message-ID: 458944A4.8080704@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Martijn van Oosterhout wrote:
> On Wed, Dec 20, 2006 at 07:20:14AM -0600, Kenneth Marshall wrote:
>
>> On Wed, Dec 20, 2006 at 01:26:59PM +0100, Peter Eisentraut wrote:
>>
>>> Am Mittwoch, 20. Dezember 2006 04:44 schrieb Tom Lane:
>>>
>>>> If you can show me a reasonably bulletproof or machine-checkable way to
>>>> keep the two kinds of column numbers distinct, I'd be all for it.
>>>>
>>> The only way I can see is to make the domains of the numbers distinct.
>>>
>>>
>> Negative vs. positive numbers?
>>
>
> Negative is used by system columns. Just adding some large constant
> (say 10000) should be enough.
>
> Have a nice day,
>

Or we could divide the positive number space in two, by starting at 2^14
(attnums are int2). Then a simple bitmask test would work to distinguish
them.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2006-12-20 14:15:05 Re: column ordering, was Re: [PATCHES] Enums patch v2
Previous Message Peter Eisentraut 2006-12-20 13:59:21 Re: column ordering, was Re: [PATCHES] Enums patch v2

Browse pgsql-patches by date

  From Date Subject
Next Message Stephen Frost 2006-12-20 14:15:05 Re: column ordering, was Re: [PATCHES] Enums patch v2
Previous Message Peter Eisentraut 2006-12-20 13:59:21 Re: column ordering, was Re: [PATCHES] Enums patch v2