Received: from corvette.mascari.com (dhcp9595024.columbus.rr.com [24.95.95.24]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA34120 for ; Fri, 26 May 2000 21:48:00 -0400 (EDT) (envelope-from mascarm@mascari.com) Received: from mascari.com (ferrari.mascari.com [192.168.2.1]) by corvette.mascari.com (8.9.3/8.9.3) with ESMTP id VAA01695; Fri, 26 May 2000 21:45:07 -0400 Message-ID: <392F28A3.7EB67B84@mascari.com> Date: Fri, 26 May 2000 21:45:07 -0400 From: Mike Mascari Organization: Mascari Development Inc X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.5-15 i586) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Momjian CC: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: Re: [SQL] aliases break my query References: <200005262343.TAA02242@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/707 Bruce Momjian wrote: > > > "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? How about a SET variable which allows PostgreSQL to reject any queries which are not entirely within the specificaton; kind of like -ansi -pedantic with gcc? Perhaps that's quite a bit of work, but it seems quite valuable for developing portable applications...Of course dependency on PostgreSQL extensions isn't a bad thing either ;-) Mike Mascari