Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2Xk7-00020V-DD for pgsql-docs@arkaria.postgresql.org; Mon, 13 Jan 2014 02:59:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W2Xk6-0001eK-TJ for pgsql-docs@arkaria.postgresql.org; Mon, 13 Jan 2014 02:59:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2Xk6-0001eE-C6 for pgsql-docs@postgresql.org; Mon, 13 Jan 2014 02:59:10 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2Xk4-0008Jk-0E for pgsql-docs@postgresql.org; Mon, 13 Jan 2014 02:59:10 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W2Xk0-0003wx-4v; Sun, 12 Jan 2014 21:59:04 -0500 Date: Sun, 12 Jan 2014 21:59:04 -0500 From: Bruce Momjian To: Pavel Stehule Cc: Tom Lane , pgsql-docs Subject: Re: remove undocumented assign syntax from plpgsql doc Message-ID: <20140113025904.GB22464@momjian.us> References: <20140111184106.GF28089@momjian.us> <24220.1389466350@sss.pgh.pa.us> <20140111190246.GG28089@momjian.us> <24577.1389467569@sss.pgh.pa.us> <20140112042306.GM28089@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 On Sun, Jan 12, 2014 at 07:00:09AM +0100, Pavel Stehule wrote: > Comment updated.  Patch attached. > > > > Still I am missing message about preferred syntax (or we should to enhance GET > DIAGNOSTICS doc about proprietary syntax). > > PL/pgSQL, PL/SQL is mix of two languages: ADA and SQL - and their designers > decided so embedded SQL statements will be placed in native SQL syntax (and ADA > in simplified ADA syntax) > > We have to find a agreement what we will prefer for PL/pgSQL: > > The assign statement is "ADA" statement - ":=" is preferred > > The GET DIAGNOSTICS is "SQL" statement - "=" is preferred > > A newer SQL/PSM was designed differently - without this dichotomy - A > assignment is emphased by syntax SET varname = value >   > A proper syntax is good information what is coming from - and It is good mental > helper to understand a philosophy of stored procedures (that shares concepts > with PL/SQL). Next argument is similarity with PL/SQL and SQL PL. This > statement (GET DIAGNOSTICS) is supported on both environments and only "=" is > allowed there. I find the rules above so complex that I don't see how we can recommend a best syntax. What I did in the patch I just posted was to put the preferred operator first, but I don't see why we want to get into these details in the docs. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs