Re: REPACK and naming

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Marcos Pegoraro <marcos@f10.com.br>
Cc: Álvaro Herrera <alvherre@alvh.no-ip.org>, Bruce Momjian <bruce@momjian.us>, PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-17T13:09:28Z
Lists: pgsql-hackers
On Wed, Sep 17, 2025 at 8:04 AM Marcos Pegoraro <marcos@f10.com.br> wrote:
> Em ter., 16 de set. de 2025 às 23:01, Robert Haas <robertmhaas@gmail.com> escreveu:
>> I think RETABLE is not a proposal to be taken seriously. That's
>> extremely confusing.
>
> This feature could be used in a future version to rearrange fields in a table, for better padding.
> I don't think we have another one available for this purpose.
>
> CREATE TABLE T(A text, B integer, C bigint, D integer);
>
> We could have something like
> RETABLE T USING(B, D, C, A)
>
> So REPACK isn't the best for this, if this feature would exist some day.

RETABLE just isn't a word. The code sometimes calls this a REWRITE of
a table, which would be reasonable. I suspect, though, that changing
the column order would end up being a form of ALTER TABLE.

-- 
Robert Haas
EDB: http://www.enterprisedb.com