On 11/17/15 9:21 AM, Melvin Davidson wrote:
Your problem is the use of SELECT *

I've often wished for a way to do *, but make changes to the results that a normal * would give you. The two operations I've wished for are to either remove some fields from the list, or to rename some fields.

I suspect you could create a function that would do this. You wouldn't want to just blindly operate on a CREATE VIEW command because of things like

SELECT a.*, b.blah FROM (SELECT 1,2,3) a, b

but I think it might be possible to get the raw data out of the parser (the grammar certainly provides it). It would probably involve C code though.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to