Revisiting ALTER COLUMN POSITION support

From: Daniel Cyran <danielcyran95(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Revisiting ALTER COLUMN POSITION support
Date: 2025-11-28 07:03:57
Message-ID: CAHKojA-YN7V+5z4DMusnBh5es0S9dVHh97W8C-igvkh8BWCaxw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I'd like to reopen the discussion about adding support for reorderable
columns (e.g. ALTER COLUMN POSITION or ALTER COLUMN ... AFTER ...).

This request has existed for many years, and there is already a documented
outline and reasoning here:
https://wiki.postgresql.org/wiki/Alter_column_position
<https://wiki.postgresql.org/wiki/Alter_column_position?utm_source=chatgpt.com>

The lack of this feature becomes a real issue in long-term schemas with
large and evolving tables. While PostgreSQL assumes column order is
cosmetic, in real-world environments the ability to logically group and
reorder columns significantly improves maintainability, onboarding, query
readability and workflow efficiency — especially when tables grow over
several years and may contain dozens or hundreds of fields.

Other major databases provide this functionality (MySQL, MariaDB, SQL
Server, Oracle), and PostgreSQL is increasingly used in large SaaS systems
and enterprise environments where schema evolution and human readability
matter.

I understand this requires internal architectural work (physical vs logical
ordering identifiers), but since the request keeps resurfacing, I'm asking
whether this can be reconsidered for a future release — or if there is any
active discussion, proposal or roadmap direction related to it.

Thanks.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-11-28 07:40:50 Re: more C99 cleanup
Previous Message vignesh C 2025-11-28 06:54:27 Re: Proposal: Conflict log history table for Logical Replication