Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1g31-0001FY-Kv for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 16:02:19 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1g30-0006PK-5E for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 16:02:19 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1T1g2y-0002lK-21; Wed, 15 Aug 2012 12:02:16 -0400 Date: Wed, 15 Aug 2012 12:02:16 -0400 From: Bruce Momjian To: Tom Lane Cc: Robert Haas , raf , pgsql-bugs@postgresql.org Subject: Re: BUG #6165: documentation bug in plpgsql-declarations.html and plpgsql-statements.html (or plpgsql parser bug) Message-ID: <20120815160216.GJ25473@momjian.us> References: <201108170521.p7H5L1LY084474@wwwmaster.postgresql.org> <9622.1314044224@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9622.1314044224@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/105 X-Sequence-Number: 33829 On Mon, Aug 22, 2011 at 04:17:04PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Wed, Aug 17, 2011 at 1:21 AM, raf wrote: > >> so, there is either a plpgsql parser bug that treats the sql equality > >> operator as the plpgsql assignment operator, or "=" is an undocumented > >> alternative to the documented plpgsql assignment operator (":="). > > > I think it's the latter. > > It's definitely intentional, not a bug, so far as the source code is > concerned: > > assign_operator : '=' > | COLON_EQUALS > ; > > > I have a vague recollection that we might > > have left that undocumented on purpose, but I'm not actually sure why > > we support it in the first place. > > I think it's legacy at this point. We have discussed before whether to > document it, and IIRC the general feeling was "if we do document it, > we'll never be able to get rid of it". Whether we could get rid of it > now (instead of documenting it) was not seriously discussed. I've seen > at least a few people saying that they do rely on it ... I think the question is whether '=' is used enough that we have to mention that it is a non-standard extension that might be removed someday, or something. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +