Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W25lw-0004DQ-LP for pgsql-docs@arkaria.postgresql.org; Sat, 11 Jan 2014 21:07:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W25lw-0006QB-5J for pgsql-docs@arkaria.postgresql.org; Sat, 11 Jan 2014 21:07:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W25lv-0006Q5-Fe for pgsql-docs@postgresql.org; Sat, 11 Jan 2014 21:07:11 +0000 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W25ls-0002gW-Rr for pgsql-docs@postgresql.org; Sat, 11 Jan 2014 21:07:10 +0000 Received: by mail-ee0-f44.google.com with SMTP id b57so2508972eek.3 for ; Sat, 11 Jan 2014 13:07:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=4yQW2zmAAyP27X6ZbbE+hIa8I0DWTT5fmE5G2k9mWjA=; b=gi5EWadijo4Z9Y9FwdJxLVoZb2D4wtcB56saypLxq8i6MrQGzbCLBHRTaZ6iPLhXMu IulOO2Zn2jRDKmtf445wA1JRpMqMiaCkjNli5W4gm4JsGn3L5yReYnwgpwJXOIflYXI0 JiKUcnj+5hRhFG2hsUeyGvjl3KKI42RY60mDdVIpP7cbDzGNxIvV5ooVDoJl57dGd57K pYgxi0p5wjcM9mPZTy7ukwucVSUFQEONaQOx/Z365jD+NoRgyNLAItoVvB5yM8OlHj5w jGNdszk2XaEg84wBPeNDDOKPg+BnSDwkX3qTMhGebDA2qL5wWhJYpd1ckkWq0CqcOXP6 krTA== X-Received: by 10.14.113.199 with SMTP id a47mr18018591eeh.41.1389474427617; Sat, 11 Jan 2014 13:07:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.75.198 with HTTP; Sat, 11 Jan 2014 13:06:27 -0800 (PST) In-Reply-To: <24577.1389467569@sss.pgh.pa.us> References: <20140111184106.GF28089@momjian.us> <24220.1389466350@sss.pgh.pa.us> <20140111190246.GG28089@momjian.us> <24577.1389467569@sss.pgh.pa.us> From: Pavel Stehule Date: Sat, 11 Jan 2014 22:06:27 +0100 Message-ID: Subject: Re: remove undocumented assign syntax from plpgsql doc To: Tom Lane Cc: Bruce Momjian , pgsql-docs Content-Type: multipart/alternative; boundary=001a1133ae00aec57004efb839f3 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a1133ae00aec57004efb839f3 Content-Type: text/plain; charset=UTF-8 2014/1/11 Tom Lane > Bruce Momjian writes: > > Oh, I think you are right. I have reverted the patch. Attached is > > proposed documentation for '='. > > Meh. Variable initialization is only one of multiple cases (assignment, > GET DIAGNOSTICS; maybe others, I've not examined the grammar). Also, > if we do it like this, we're implying that both := and = are equally > preferred, which might not be the impression we want to leave. > GET DIAGNOSTICS is defined by standard - and there "=" should be allowed only - although we allow ":=" too. It is a embedded SQL statement - although it is implemented as plpgsql statement. Same situation is with UPDATE statement - we don't allow ":=" there. > > I'd be a bit inclined to just stick a NOTE somewhere saying that "=" > can be used in place of ":=" for assignment. > ok If we accept it and we close this topic, then following comment should be removed assign_operator : '=' /* not documented because it might be removed someday */ | COLON_EQUALS ; Regards Pavel > > regards, tom lane > --001a1133ae00aec57004efb839f3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



2014/1/11 Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <bruce@momjian.us&= gt; writes:
> Oh, I think you are right. =C2=A0I have reverted the patch. =C2=A0Atta= ched is
> proposed documentation for '=3D'.

Meh. =C2=A0Variable initialization is only one of multiple cases (assignmen= t,
GET DIAGNOSTICS; maybe others, I've not examined the grammar). =C2=A0Al= so,
if we do it like this, we're implying that both :=3D and =3D are equall= y
preferred, which might not be the impression we want to leave.

GET DIAGNOSTICS is defined by standard - and there = "=3D" should be allowed only - although we allow ":=3D"= too. It is a embedded SQL statement - although it is implemented as plpgsq= l statement.

Same situation is with UPDATE statement - we don't allow= ":=3D" there.
=C2=A0

I'd be a bit inclined to just stick a NOTE somewhere saying that "= =3D"
can be used in place of ":=3D" for assignment.

ok

If we accept it and we close this to= pic, then following comment should be removed

assign_operator : '= ;=3D'=C2=A0=C2=A0 /* not documented because it might be removed someday= */
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | COLON_EQUALS
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ;

Regards

Pavel
<= /div>

=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane

--001a1133ae00aec57004efb839f3--