Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA40334; Fri, 26 May 2000 12:26:13 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA02395; Fri, 26 May 2000 12:26:07 -0400 (EDT) To: Peter Eisentraut cc: Joseph Shraibman , "pgsql-sql@postgresql.org" , pgsql-hackers@postgreSQL.org Subject: Re: aliases break my query In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Fri, 26 May 2000 15:02:53 +0200" Date: Fri, 26 May 2000 12:26:06 -0400 Message-ID: <2392.959358366@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200005/164 Peter Eisentraut writes: > Once again, I think that we *really* need to discuss whether implicit > range table entries in SELECT are a good idea. We invariably get a > question like this every week and invariably the answer is "if you give a > table an alias you *must* refer to it by that alias". (I'm sure Tom has > this reply automated by now.) No, this one was actually a pretty original way of shooting oneself in the foot ;-). I thought the interesting point was the confusion between whether variables in the inner select were supposed to be local to the inner select or references to the outer select. I'm not sure getting rid of implicit rangetable entries would've helped prevent that. > I claim the only thing that buys is > confusion for very little convenience at the other end. > > Stop the madness! :) I doubt that it's worth breaking a lot of existing applications for. At one time Bruce had made some patches to emit informative notice messages about implicit FROM entries, but that got turned off again for reasons that I forget... regards, tom lane