Re: Column storage positions - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: Column storage positions
Date
Msg-id E1539E0ED7043848906A8FF995BDA57901CAF738@m0143.s-mxs.net
Whole thread Raw
In response to Re: Column storage positions  (Kris Jurka <books@ejurka.com>)
List 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


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: autovacuum next steps, take 2
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: autovacuum next steps, take 2