Cannot query views with WHERE clause on renamed columns - Mailing list pgsql-general

From Alexander Reichstadt
Subject Cannot query views with WHERE clause on renamed columns
Date
Msg-id F75F66D7-F5E0-4F5D-90CE-E5DCCE4771B3@mac.com
Whole thread Raw
Responses Re: Cannot query views with WHERE clause on renamed columns  (David G Johnston <david.g.johnston@gmail.com>)
Re: Cannot query views with WHERE clause on renamed columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

I try to do what seems to be totally simple, but it fails. If I query a view that contains renamed columns without any
qualifierlike 

SELECT * FROM myview

it displays everything. If however I do

SELECT reanmedviewcolumn FROM myview

It tells me column does not exist which in fact does. I can query any non-renamed columns. But the renamed ones I can
neithercall by their original name, not int he SELECT part nor in the WHERE clause. 

I can neither leave the view with just the original names as it's a selfjoin.

What do I need to do?

Thanks
Alex


pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: how to create a role with no privileges?
Next
From: AI Rumman
Date:
Subject: lock contention, need profiling idea