Re: Column storage positions

From: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
To: "Kris Jurka" <books(at)ejurka(dot)com>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Phil Currier" <pcurrier(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Column storage positions
Date: 2007-02-22 19:25:22
Message-ID: E1539E0ED7043848906A8FF995BDA57901CAF738@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> >> I agree, I haven't thought of drop column :-( Drop column should
have
> >> relabeled attnum. Since it was not done then, my comments are
> >> probably moot.
> >
> > We can correct this problem now.
>
> How? If attnum is serving as both physical position and
> logical order, how can you make it be logical position
> without breaking physical position?

If you ask me, attnum would be the logical position and would be used
in all other system tables. attphypos would only be used in
pg_attribute.
It would be quite some work to rearrange attnum in all system tables for
"drop column" and "add column before", but it would be nice for jdbc.

But it seems others want this: attnum beeing an arbitrary number,
that is used in all system tables and 2 extra columns in pg_attribute,
one for logical position and one for physical position.
If you want a corresponding colname to a pg_index attnum you need a map.

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas ADI SD 2007-02-22 19:35:17 Re: autovacuum next steps, take 2
Previous Message Jim C. Nasby 2007-02-22 19:24:37 Re: autovacuum next steps, take 2