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 1kg9n9-0004fH-4L for pgsql-sql@arkaria.postgresql.org; Fri, 20 Nov 2020 17:01:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kg9n8-0003Qe-3c for pgsql-sql@arkaria.postgresql.org; Fri, 20 Nov 2020 17:01:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg9n7-0003PC-Tf for pgsql-sql@lists.postgresql.org; Fri, 20 Nov 2020 17:01:45 +0000 Received: from smtp76.ord1c.emailsrvr.com ([108.166.43.76]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg9n3-0000T1-VB for pgsql-sql@lists.postgresql.org; Fri, 20 Nov 2020 17:01:44 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp2.relay.ord1c.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 94136C020E; Fri, 20 Nov 2020 12:01:40 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.5\)) Subject: Re: perform setval() fails? From: Christophe Pettus In-Reply-To: <7f3fc08f-b65d-402c-bc29-9bdb19c2526c@4js.com> Date: Fri, 20 Nov 2020 09:01:39 -0800 Cc: pgsql-sql@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com> References: <7f3fc08f-b65d-402c-bc29-9bdb19c2526c@4js.com> To: Sebastien FLAESCH X-Mailer: Apple Mail (2.3445.9.5) X-Classification-ID: 50db57bd-dd54-47a9-ba53-6887f43505f7-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Nov 20, 2020, at 09:00, Sebastien FLAESCH wrote: > test1=3D> perform setval('mytab1_pkey_seq',5000,false); > ERROR: syntax error at or near "perform" > LINE 1: perform setval('mytab1_pkey_seq',5000,false); PERFORM is a PL/pgSQL operation, and can only be used within a PL/pgSQL = function. For a direct call to PostgreSQL, SELECT is the right = operation. -- -- Christophe Pettus xof@thebuild.com