pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Jones <erik@myemma.com>
To: Aaron Bono <postgresql@aranya.com>
Cc: Markus Schaber <schabi@logix-tt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: i have table
Date: Wed, 04 Oct 2006 10:37:03 -0500
Message-ID: <4523D51F.4070208@myemma.com> (raw)
In-Reply-To: <bf05e51c0610040754o101408c2y8a743697b9ceee4@mail.gmail.com>
References: <A70AE049E81A6A40879D5DC0AC8C38C9073DCD8F@venus.infics.com>
	<45237D6E.1030601@logix-tt.com>
	<4523C3E2.4010300@myemma.com>
	<bf05e51c0610040754o101408c2y8a743697b9ceee4@mail.gmail.com>

Aaron Bono wrote:
> On 10/4/06, *Erik Jones* <erik@myemma.com <mailto:erik@myemma.com>> 
> wrote:
>
>     There is one non-SQL related reason that I like to be able to order
>     columns, at least the way they are displayed whenever the table is
>     described:  human comprehension.  For example, I like to group all
>     keys
>     in a table before data, that includes primary as well as foreign
>     keys.
>     So, say I'm building on to an existing application and I need to do an
>     ALTER TABLE on an existing table to add a foreign key to an existing
>     table.  I'd like that key to be listed with the other keys, but
>     presently that's not possible in a simple way and, to be honest, I
>     usually just go without as the process you've described below is too
>     prone to user (human) error when dealing with live, sensitive data for
>     me to want to mess with it.
>
>
> Ah, but it is possible... if you use views.
>
> I recommend you build views and query off them.  Then you can control 
> the order the columns will appear.
Which would be great if I didn't have (many) thousands of lines of code 
that already use the tables.  Besides, this is no where near a 'make or 
break' thing.  It's just a matter of aesthetic preference.

-- 
erik jones <erik@myemma.com>
software development
emma(r)




view thread (19+ messages)  latest in thread

Message-ID: <4523D51F.4070208@myemma.com>
Permalink:  ../4523D51F.4070208@myemma.com/
Also on:    postgresql.org/message-id/4523D51F.4070208@myemma.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-sql@postgresql.org
  Cc: erik@myemma.com, postgresql@aranya.com, schabi@logix-tt.com
  Subject: Re: i have table
  In-Reply-To: <4523D51F.4070208@myemma.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