Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mizb4-0003zM-BT for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Nov 2021 13:49:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mizb2-0001Vu-Rf for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Nov 2021 13:49:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mizb2-0001Vl-KN for pgsql-bugs@lists.postgresql.org; Fri, 05 Nov 2021 13:49:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mizaz-0000Nc-OQ for pgsql-bugs@lists.postgresql.org; Fri, 05 Nov 2021 13:49:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1A5DnPsh412654; Fri, 5 Nov 2021 09:49:25 -0400 From: Tom Lane To: nagylzs@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17272: Incorrect syntax parsed In-reply-to: <17272-3abe7815be15e470@postgresql.org> References: <17272-3abe7815be15e470@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 05 Nov 2021 10:01:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <412652.1636120165.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 05 Nov 2021 09:49:25 -0400 Message-ID: <412653.1636120165@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Formally, the INTO should always precede the FROM keyword in a SELECT IN= TO > statement. ( https://www.postgresql.org/docs/12/sql-selectinto.html ) That is not the appropriate reference for plpgsql's version of SELECT INTO. You should be reading https://www.postgresql.org/docs/12/plpgsql-statements.html#PLPGSQL-STATEME= NTS-SQL-ONEROW which explains plpgsql's rules for where to put INTO. regards, tom lane