Re: RE : full featured alter table?

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: RE : full featured alter table?
Дата
Msg-id Pine.LNX.4.33.0306161516060.2361-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: RE : full featured alter table?  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: RE : full featured alter table?  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
On Mon, 16 Jun 2003, Jim C. Nasby wrote:

> On Sat, Jun 14, 2003 at 06:55:36PM +0200, Bruno BAGUETTE wrote:
> > Hello everybody,
> >
> > > The one thing we don't have that I think would be useful is a
> > > way to re-order the columns in a table. Maybe it's just me,
> > > but I tend to want column to appear in a specific order, and
> > > the only way you can accomplish this today is by re-creating
> > > the entire table.
> >
> > I agree with Jim, this would be a 'cool but not mandatory' feature ! :-)
> >
> > This feature is not mandatory since I avoid the use SELECT * FROM...
> > (and I forbid the use of SELECT * to my subordinates).
>
> 99.999% of the time, if you put SELECT * into code, you should be strung
> up by your own entrails. But do you mean to tell me that when you're
> testing stuff on the command line you never, ever use SELECT *?

I wouldn't go that far.  I build updatable views, select * from them,
cycle through the fields getting name / type and build generic forms to
let the user edit / insert new records.

It allows me to reuse the same basic chunk of code over and over.

Of course, it's select * on a view, not a table, so I set the order when I
create the view.

Now, using select * and ASSUMING the order of the variables in your
application code is a punishable offense, but as long as you determine the
name / type of the fields after the select * it's not so bad.


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres performance comments from a MySQL user
Следующее
От: Sean Chittenden
Дата:
Сообщение: Re: Sort memory not being released