pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christophe Pettus <xof@thebuild.com>
To: Sebastien FLAESCH <sf@4js.com>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: perform setval() fails?
Date: Fri, 20 Nov 2020 09:01:39 -0800
Message-ID: <5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com> (raw)
In-Reply-To: <7f3fc08f-b65d-402c-bc29-9bdb19c2526c@4js.com>
References: <7f3fc08f-b65d-402c-bc29-9bdb19c2526c@4js.com>



> On Nov 20, 2020, at 09:00, Sebastien FLAESCH <sf@4js.com> wrote:
> test1=> 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






view thread (2+ messages)

Message-ID: <5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com>
Permalink:  ../5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com/
Also on:    postgresql.org/message-id/5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: xof@thebuild.com, sf@4js.com, pgsql-sql@lists.postgresql.org
  Subject: Re: perform setval() fails?
  In-Reply-To: <5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox