Re: logical column position - Mailing list pgsql-hackers

From Jon Jensen
Subject Re: logical column position
Date
Msg-id Pine.LNX.4.58.0311171710400.12734@louche.swelter.net
Whole thread Raw
In response to logical column position  (Neil Conway <neilc@samurai.com>)
Responses Re: logical column position
List pgsql-hackers
On Mon, 17 Nov 2003, Neil Conway wrote:

> I'd like to add a new column to pg_attribute that specifies the
> attribute's "logical position" within its relation. The idea here is
> to separate the logical order of the columns in a relation from the
> on-disk storage of the relation's tuples. This allows us to easily &
> quickly change column order, add an additional column before or after
> an existing column, etc.

That sounds excellent!

>   (a) ISTM this should also apply to COPY TO and COPY FROM if the user
>       didn't supply a column list. Is this reasonable? It would break
>       dumps of the table's contents, but then again, dumps aren't
>       guaranteed to remain valid over arbitrary changes to the table's
>       meta-data.

You're just saying it'd break old dumps, right? I'd assume COPY FROM would
use attpos ordering when writing out columns, or that every user-visible
interaction with the table pretends the columns are in attpos order. So
dumps would break no more or less than when adding or dropping a column
currently, right?

Jon


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: logical column position
Next
From: Neil Conway
Date:
Subject: Re: logical column position