Re: remove undocumented assign syntax from plpgsql doc

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: remove undocumented assign syntax from plpgsql doc
Date: 2014-01-11 21:06:27
Message-ID: CAFj8pRDukaWkUtQRZujhbLRCh6haOY-FDunVXjf2X2XNdNOKGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

2014/1/11 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Bruce Momjian <bruce(at)momjian(dot)us> 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
>

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Josh Berkus 2014-01-12 03:20:57 Re: Upgrading doc does not mention pg_restore at all
Previous Message Tom Lane 2014-01-11 19:46:58 Re: remove undocumented assign syntax from plpgsql doc