Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/06, Jeff Davis <pgsql@xxxxxxxxxxx> wrote:
> 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"?

bar is somthing else, a constant, field from related join, or
whetever.  Also, i am much more liberal about select * in views,
because the decision about columns is pushed out to the view selector:

create view foobar as
 select * from foo natural join bar;

My rationale here is the major point of the view is relating foo to
bar, not choosing columns. Also, if foo/bar gain lose columns, I have
but to drop/recreate the view without changing it's definition.  This
makes the view more functionally dependant on the tables.

merlin


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux