Re: i have table

Поиск
Список
Период
Сортировка
Искать
От
Achilleas Mantzios
Тема
Re: i have table
Дата
Msg-id
200610051032.55610.achill@matrix.gatewaynet.com
Ответ на
Re: i have table (Erik Jones)
Список
Дерево обсуждения
i have table "Penchalaiah P." <penchalaiahp@infics.com>
Re: i have table "A. Kretschmer" <andreas.kretschmer@schollglas.com>
Re: i have table Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: i have table <operationsengineer1@yahoo.com>
Re: i have table Markus Schaber <schabi@logix-tt.com>
Re: i have table Erik Jones <erik@myemma.com>
Re: i have table "Aaron Bono" <postgresql@aranya.com>
Re: i have table Erik Jones <erik@myemma.com>
Re: i have table Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: i have table Tom Lane <tgl@sss.pgh.pa.us>
Re: i have table Achilleas Mantzios <achill@matrix.gatewaynet.com>
Re: i have table "Aaron Bono" <postgresql@aranya.com>
Re: i have table Andrew Sullivan <ajs@crankycanuck.ca>
Re: i have table "Aaron Bono" <postgresql@aranya.com>
Re: i have table Andrew Sullivan <ajs@crankycanuck.ca>
Re: i have table Daryl Richter <daryl@eddl.us>
Re: i have table "Aaron Bono" <postgresql@aranya.com>
Re: i have table Scott Marlowe <smarlowe@g2switchworks.com>
Re: i have table Daryl Richter <daryl@eddl.us>
Στις Τετάρτη 04 Οκτώβριος 2006 18:37, ο/η Erik Jones έγραψε:
> 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.

Alright, you could play with something like:

UPDATE pg_attribute SET attnum =  where 
attrelid= and attname='';

but do some research of possible bad side effects.
-- 
Achilleas Mantzios

В списке pgsql-sql по дате отправления
От: James Baxendale
Дата:
От: Tom Lane
Дата:
Сообщение: Re: i have table
FAQ