Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CB6FC9FB38C for ; Wed, 4 Oct 2006 12:37:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 70522-01 for ; Wed, 4 Oct 2006 15:37:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from myemma.com (db1.e2ma.net [66.179.147.163]) by postgresql.org (Postfix) with ESMTP id 7B8C99FB388 for ; Wed, 4 Oct 2006 12:37:05 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by myemma.com (Postfix) with ESMTP id DB5DA23CCA; Wed, 4 Oct 2006 10:37:04 -0500 (CDT) Received: from myemma.com ([127.0.0.1]) by localhost (velma [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00907-06; Wed, 4 Oct 2006 10:37:04 -0500 (CDT) Received: from [10.0.23.55] (unknown [209.149.59.218]) by myemma.com (Postfix) with ESMTP id 23C8323CDD; Wed, 4 Oct 2006 10:37:04 -0500 (CDT) Message-ID: <4523D51F.4070208@myemma.com> Date: Wed, 04 Oct 2006 10:37:03 -0500 From: Erik Jones User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Aaron Bono Cc: Markus Schaber , pgsql-sql@postgresql.org Subject: Re: i have table References: <45237D6E.1030601@logix-tt.com> <4523C3E2.4010300@myemma.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at myemma.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.133 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/41 X-Sequence-Number: 26430 Aaron Bono wrote: > On 10/4/06, *Erik Jones* > > 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 software development emma(r)