Search Postgresql Archives

Re: Saving view turns SELECT * into field list

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

 



On Monday, October 15, 2018, Ben Uphoff <buphoff@xxxxxxxxxxxxx> wrote:


Why, when I save a simple view like:

 

SELECT * FROM a_table

 

…does PostgreSQL turn the * into a field list like:

 

SELECT field1, field2, field3, field4 FROM a_table



Yes, deeply nesting views is a maintenance concern.  It works this way so the view remains stable (there may be others, the reasoning no longer really matters...).  If you really want dynamic SQL you will need to use a function.

David J.


[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