pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Reordering the fields in a table
Date: Fri, 16 Apr 2021 22:33:26 -0500
Message-ID: <ef3e9b95-719c-c37a-822e-82bf8d5b74af@gmail.com> (raw)
In-Reply-To: <d3bd1525612fe9784b66d313755947a9284e4ef9.camel@cybertec.at>
References: <SN6PR11MB332652C8CA57B27E80EF9FBDDE4C9@SN6PR11MB3326.namprd11.prod.outlook.com>
	<d3bd1525612fe9784b66d313755947a9284e4ef9.camel@cybertec.at>

On 4/16/21 2:54 PM, Laurenz Albe wrote:
> 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.

Rubbish.  Database tables are designed by humans to store data that humans 
care about.

> 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.

Adding "ALTER TABLE MOVE COLUMN ... BEFORE/AFTER COLUMN ..." is pretty 
trivial, requiring "just another table", which stores the physical order of 
the columns, and also the order in which they are presented to the "user 
layer".  I know this because such a feature was implemented 15+ years ago in 
Rdb/VMS.

-- 
Angular momentum makes the world go 'round.





view thread (15+ messages)  latest in thread

Message-ID: <ef3e9b95-719c-c37a-822e-82bf8d5b74af@gmail.com>
Permalink:  ../ef3e9b95-719c-c37a-822e-82bf8d5b74af@gmail.com/
Also on:    postgresql.org/message-id/ef3e9b95-719c-c37a-822e-82bf8d5b74af@gmail.com

 · 

reply

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: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Reordering the fields in a table
  In-Reply-To: <ef3e9b95-719c-c37a-822e-82bf8d5b74af@gmail.com>

* 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