Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0728DB5DBEA for ; Mon, 22 Aug 2011 17:17:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 58793-03 for ; Mon, 22 Aug 2011 20:17:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 14DBAB5DBDC for ; Mon, 22 Aug 2011 17:17:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p7MKH4Ae009623; Mon, 22 Aug 2011 16:17:04 -0400 (EDT) To: Robert Haas cc: raf , pgsql-bugs@postgresql.org Subject: Re: BUG #6165: documentation bug in plpgsql-declarations.html and plpgsql-statements.html (or plpgsql parser bug) In-reply-to: References: <201108170521.p7H5L1LY084474@wwwmaster.postgresql.org> Comments: In-reply-to Robert Haas message dated "Mon, 22 Aug 2011 12:34:15 -0400" Date: Mon, 22 Aug 2011 16:17:04 -0400 Message-ID: <9622.1314044224@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.846 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.946 X-Spam-Level: X-Archive-Number: 201108/141 X-Sequence-Number: 30953 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 ... regards, tom lane