Re: RE : full featured alter table? - Mailing list pgsql-general

From scott.marlowe
Subject Re: RE : full featured alter table?
Date
Msg-id Pine.LNX.4.33.0306161516060.2361-100000@css120.ihs.com
Whole thread Raw
In response to Re: RE : full featured alter table?  ("Jim C. Nasby" <jim@nasby.net>)
Responses Re: RE : full featured alter table?  (Dennis Gearon <gearond@cvc.net>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres performance comments from a MySQL user
Next
From: Sean Chittenden
Date:
Subject: Re: Sort memory not being released