Jan Wieck <janwieck@Yahoo.com> writes:
> Hmm - too simple - real life is harder. So to what do you
> expand the query
> SELECT a, c, d FROM my_view, other_table
> WHERE my_view.a = other_table.a
> AND other_table.x = 'foo';
SELECT a, c, d FROM (SELECT a, b, c FROM my_table) AS my_view, other_table WHERE my_view.a =
other_table.a AND other_table.x = 'foo';
I'm still not detecting a problem here ... if selecting from a view
*doesn't* act exactly like a sub-SELECT, it'd be broken IMHO.
We're not that far away from being able to do this, and it looks more
attractive to work on that than to hack the rewriter into an even
greater state of unintelligibility ...
regards, tom lane