| From: | Erik Jones <erik(at)myemma(dot)com> | 
|---|---|
| To: | Aaron Bono <postgresql(at)aranya(dot)com> | 
| Cc: | Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: i have table | 
| Date: | 2006-10-04 15:37:03 | 
| Message-ID: | 4523D51F.4070208@myemma.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
Aaron Bono wrote:
> On 10/4/06, *Erik Jones* <erik(at)myemma(dot)com <mailto:erik(at)myemma(dot)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(at)myemma(dot)com>
software development
emma(r)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Markus Schaber | 2006-10-04 15:44:49 | Re: Assigning a timestamp without timezone to a timestamp | 
| Previous Message | Aaron Bono | 2006-10-04 14:55:49 | Re: [SQL] How to overwrite a table [only data]? |