Re: Separate the attribute physical order from logical order

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Денис Романенко <deromanenko(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Separate the attribute physical order from logical order
Date: 2022-06-28 13:00:05
Message-ID: CAMsGm5cOf=71GiELtDAaX4Qd6WQcyzUzTapsDuHzR1prmLdSdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 28 Jun 2022 at 05:32, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:

> I think that supporting at least a way to specify the logical order during
> the
> table creation should be easy to implement (there shouldn't be any
> question on whether it needs to invalidate any cache or what lock level to
> use), and could also be added in the initial submission without much extra
> efforts, which could help with the testing.
>

I think the meaning of “logical order” (well, the meaning it has for me, at
least) implies that the logical order of a table after CREATE TABLE is the
order in which the columns were given in the table creation statement.

If there needs to be a way of specifying the physical order separately,
that is a different matter.

ALTER TABLE ADD … is another matter. Syntax there to be able to say BEFORE
or AFTER an existing column would be nice to have. Presumably it would
physically add the column at the end but set the logical position as
specified.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2022-06-28 13:07:58 Re: Making the subquery alias optional in the FROM clause
Previous Message Aleksander Alekseev 2022-06-28 12:37:14 Re: [PATCH] Compression dictionaries for JSONB