Saving view turns SELECT * into field list - Mailing list pgsql-general

From Ben Uphoff
Subject Saving view turns SELECT * into field list
Date
Msg-id 4748E0E4-9D2A-4D44-B20F-6749E8C989D7@villagemd.com
Whole thread Raw
Responses Re: Saving view turns SELECT * into field list  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Saving view turns SELECT * into field list  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Saving view turns SELECT * into field list  (Ben Madin <ben@ausvet.com.au>)
List pgsql-general

Hey team – I’m sure this has come up, but my search engine skills couldn’t find an explanation:

 

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

 

?

 

This is super-frustrating, as it means I’ll have to manually change an aggregating “parent” view’s select lists every time I change the “child” views.

 

Thanks for any info. -Ben

******************* PLEASE NOTE ******************* This E-Mail/telefax message and any documents accompanying this transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law and is intended solely for the addressee(s) named above. If you are not the intended addressee/recipient, you are hereby notified that any use of, disclosure, copying, distribution, or reliance on the contents of this E-Mail/telefax information is strictly prohibited and may result in legal action against you. Please reply to the sender advising of the error in transmission and immediately delete/destroy the message and any accompanying documents. Thank you.

pgsql-general by date:

Previous
From: David Steele
Date:
Subject: Re: Setting up continuous archiving
Next
From: Tom Lane
Date:
Subject: Re: Saving view turns SELECT * into field list