From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Campbell, Lance <lance@illinois.edu>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Reordering the fields in a table
Date: Fri, 16 Apr 2021 21:54:24 +0200
Message-ID: <d3bd1525612fe9784b66d313755947a9284e4ef9.camel@cybertec.at> (raw)
In-Reply-To: <SN6PR11MB332652C8CA57B27E80EF9FBDDE4C9@SN6PR11MB3326.namprd11.prod.outlook.com>
References: <SN6PR11MB332652C8CA57B27E80EF9FBDDE4C9@SN6PR11MB3326.namprd11.prod.outlook.com>
On Fri, 2021-04-16 at 16:15 +0000, Campbell, Lance wrote:
> I would love to see an enhancement to PostgreSQL where administrators had some way to reorder the fields in their tables.
>
> Why is this a big deal?
> The one issue that causes me the most grief is the readability of tables. When you manage 17 services
> where you are continually tweaking the system you find the tables are very unreadable.
> New fields are continually added to the bottom of tables. They are just not readable.
There is a misconception here.
Database tables are not designed for human consumption.
If you want to present your table data in a readable format, you need a front end application.
Arranging table columns is the job of such a tool.
If you want to do it in the database, use a view.
Simple views that just reorder the columns are updatable, so you could just
use those instead of the underlying tables in your statements.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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: laurenz.albe@cybertec.at, lance@illinois.edu, pgsql-admin@lists.postgresql.org
Subject: Re: Reordering the fields in a table
In-Reply-To: <d3bd1525612fe9784b66d313755947a9284e4ef9.camel@cybertec.at>
* 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