Re: Is it possible to return custom type as proper ROW?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>, pgsql-general(at)postgresql(dot)org, "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Subject: Re: Is it possible to return custom type as proper ROW?
Date: 2006-10-11 21:08:03
Message-ID: 1160600883.31966.40.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2006-10-12 at 01:36 +0530, Merlin Moncure wrote:
> On 10/11/06, Uwe C. Schroeder <uwe(at)oss4u(dot)com> wrote:
> > Well, "SELECT *" is only evil if your application relies on a specific column
> > order to function. The moment you change the table layout and you're using
> > "select *" your application will cease functioning.
> > My app uses tons of select *, but then I wrote an object mapper that queries
> > the information schema at startup - so it's aware of table changes and
> > adjusts accordingly.
>
> +1
>
> assumed column ordering is the real enemy. Here is another place
> where select * is imo better style than non select *:
>
> select q.*, bar from
> (
> select a, b,c from foo
> ) q;
>

What is "bar"?

Were you trying to show how * can be used when you have already
specified the order in a subquery?

That makes sense to me as long as you always see the order in the query,
and as long as it's always well-defined.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-10-11 21:10:38 Re: question on renaming a foreign key
Previous Message Ludwig Kniprath 2006-10-11 21:04:29 Re: Problem compiling PostGIS 1.1.4