From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Campbell, Lance <lance@illinois.edu>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Reordering the fields in a table
Date: Sun, 18 Apr 2021 13:19:27 -0400
Message-ID: <20210418171927.GA25053@alvherre.pgsql> (raw)
In-Reply-To: <SN6PR11MB332652C8CA57B27E80EF9FBDDE4C9@SN6PR11MB3326.namprd11.prod.outlook.com>
On 2021-Apr-16, Campbell, Lance wrote:
> If there is a way to do this please let me know.
>
> PostgreSQL Request
> I would love to see an enhancement to PostgreSQL where administrators
> had some way to reorder the fields in their tables. As a software
> developer I can easily write a tool to reorder the fields in a table
> if there were no foreign keys. But foreign keys throw an enormous
> hurdle in my way.
Yeah, this feature has been requested many times in the past. It's a
tough nut to crack though, which is why it doesn't exist today. I had a
patch partially working that did it, but there were a number of areas in
the code I couldn't figure out how to change, and after spending much
more time than I should have, I abandoned it.
I have learned a few more things since then, and maybe if I attempted it
now, I could make it work. But I have no plans to work on that at
present.
It is not impossible, just pretty difficult.
--
Álvaro Herrera 39°49'30"S 73°17'W
Officer Krupke, what are we to do?
Gee, officer Krupke, Krup you! (West Side Story, "Gee, Officer Krupke")
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: alvherre@alvh.no-ip.org, lance@illinois.edu, pgsql-admin@lists.postgresql.org
Subject: Re: Reordering the fields in a table
In-Reply-To: <20210418171927.GA25053@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox