Re: perform setval() fails? - Mailing list pgsql-sql

From Christophe Pettus
Subject Re: perform setval() fails?
Date
Msg-id 5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com
Whole thread Raw
In response to perform setval() fails?  (Sebastien FLAESCH <sf@4js.com>)
List pgsql-sql

> 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,
SELECTis the right operation. 

--
-- Christophe Pettus
   xof@thebuild.com




pgsql-sql by date:

Previous
From: Sebastien FLAESCH
Date:
Subject: perform setval() fails?
Next
From: Sebastien FLAESCH
Date:
Subject: Re: Get last generated serial sequence and set it up when explicit value is used