Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id TAA78338 for ; Fri, 26 May 2000 19:50:10 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id TAA02242; Fri, 26 May 2000 19:43:12 -0400 (EDT) From: Bruce Momjian Message-Id: <200005262343.TAA02242@candle.pha.pa.us> Subject: Re: Re: [SQL] aliases break my query In-Reply-To: <3661.959376868@sss.pgh.pa.us> "from Tom Lane at May 26, 2000 05:34:28 pm" To: Tom Lane Date: Fri, 26 May 2000 19:43:12 -0400 (EDT) CC: Zeugswetter Andreas , pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200005/705 > "Zeugswetter Andreas" writes: > > I think we could get agreement to not allow implicit from entries > > if there is a from clause in the statement, but allow them if a from clause > > is missing altogether. The patch did not distinguish the two cases. > > Hmm, that's a thought. Taking it a little further, how about this: > > "Emit a notice [or error if you insist] when an implicit FROM item is > added that refers to the same underlying table as any existing FROM > item." > > 95% of the complaints I can remember seeing were from people who got > confused by the behavior of "FROM table alias" combined with a reference > like "table.column". Seems to me the above rule would catch this case > without being obtrusive in the useful cases. Comments? Yes, I even added a define called FROM_WARN. It was disabled, and never enabled. When can we enable it? -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026