I would like it if pgAdmin could generate the script to insert table columns into the middle of an existing table. This is something that is available in the SQL Server Management Studio, which uses essentially the same steps that I described in my initial request. So, hte answer is neither A or B but to script the insertion of columns into an existing table, which requires the creation of a replacement table with the new columns.

I've attached one of my scripts to this message. This script is pretty complex.

*/Patrick Headley/*
Linx Consulting, Inc.
phead...@linxco-inc.com
www.linxco-inc.com
On 05/06/2016 01:24 PM, David G. Johnston wrote:
On Fri, May 6, 2016 at 12:18 PM, Patrick Headley <phead...@linxco-inc.com <mailto:phead...@linxco-inc.com>>wrote:

    Having the ability to insert a column in the middle of a table
    using the PGAdmin 3 UI would be very nice. Benefits include
    grouping related fields and creating a column list in the natural
    flow of data entry. Having it automated within the UI would make
    this piece of DB management so much easier.


What are you asking for here?

A) For pgAdmin to run a complex algorithm to physcially re-order columns by creating a new table?
​ B) For PostgreSQL itself to allow for column re-ordering?

The later has been discussed many times, including relatively recently, but hasn't made it into -core (not even sure if patches have been proposed.

​The data entry aspect can be handled quite readily without any interaction with the physical table. Having pgAdmin or some other application maintain an ordering table that defaults to physical but can be overridden would be a somewhat trivial project compared to what you propose.

David J.​


Attachment: 2016-05-05 Add minimum_consecutive_reservations to courses.sql
Description: application/sql

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Reply via email to