From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: raf <raf@raf.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6165: documentation bug in plpgsql-declarations.html and plpgsql-statements.html (or plpgsql parser bug)
Date: Mon, 22 Aug 2011 16:17:04 -0400
Message-ID: <9622.1314044224@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoaPxqmuh=_4Y5TSHg=0Yp2xePnpfcvoeYihmD75wcVadA@mail.gmail.com>
References: <201108170521.p7H5L1LY084474@wwwmaster.postgresql.org>
<CA+TgmoaPxqmuh=_4Y5TSHg=0Yp2xePnpfcvoeYihmD75wcVadA@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Aug 17, 2011 at 1:21 AM, raf <raf@raf.org> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, raf@raf.org
Subject: Re: BUG #6165: documentation bug in plpgsql-declarations.html and plpgsql-statements.html (or plpgsql parser bug)
In-Reply-To: <9622.1314044224@sss.pgh.pa.us>
References: <201108170521.p7H5L1LY084474@wwwmaster.postgresql.org> <CA+TgmoaPxqmuh=_4Y5TSHg=0Yp2xePnpfcvoeYihmD75wcVadA@mail.gmail.com> <9622.1314044224@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox