On Thu, Dec 10, 2009 at 11:54 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: >> On Thu, Dec 10, 2009 at 1:46 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >>> My reading of the spec is that USING (and therefore NATURAL) is defined >>> to join identically named columns. Therefore, renaming one of the input >>> columns as the OP did *should* indeed *must* break the view. The problem >>> is not how to make it work, it's how to give an error message that >>> doesn't look like an internal failure. > >> That seems ugly and unnecessary. I think we might be able to define >> ourselves out of this problem. We don't guarantee (and have never >> guaranteed) that selecting from a stored view will produce the same >> results as re-executing the original query. For example, * refers the >> list of columns at definition-time, not execution-time, > > Um, aren't you contradicting yourself there?
Not that I can see. > The problem with USING is that it is not merely a join condition but > affects the set of columns emitted by the join. It can't be converted > to a simple ON without changing the semantics, and I don't believe we > should try. The OP seemed to be pretty clear on what the semantics should be, and I'm not confused either. Why are you? :-) ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs