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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Zeugswetter Andreas ADI SD <ZeugswetterA(at)spardat(dot)at>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org, Gregory Stark <stark(at)enterprisedb(dot)com>
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2
Date: 2006-12-21 16:07:20
Message-ID: 20061221160720.GE14992@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, Dec 21, 2006 at 10:50:59AM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> > The thing is, physical index numbers has meaning, the logical index
> > number does not. In a view definition we're going to store the physical
> > index, not the logical one, for example.
>
> Really? To me that's one of a large number of questions that are
> unresolved about how we'd do this. You can make a case for either
> choice in quite a number of places.

Can we? For anything of any permenence (view definitions, rules,
compiled functions, plans, etc) you're going to want the physical
number, for the same reason we store the oids of functions and tables.

I can't see the optimiser or executor caring about logical numbers
either. The planner would use it only when looking up column names.

The logical number isn't going to be used much I think. You can go from
column name to physical index directly, without ever looking up the
logical index. That's why I'm suggesting adding some large constant to
the logical numbers, since they're going to be less used in general.

Where do you think we have the choice?

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-12-21 16:11:46 Re: column ordering, was Re: [PATCHES] Enums patch v2
Previous Message Zeugswetter Andreas ADI SD 2006-12-21 16:06:53 Re: column ordering, was Re: [PATCHES] Enums patch v2

Browse pgsql-patches by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-12-21 16:11:46 Re: column ordering, was Re: [PATCHES] Enums patch v2
Previous Message Zeugswetter Andreas ADI SD 2006-12-21 16:06:53 Re: column ordering, was Re: [PATCHES] Enums patch v2