Re: perform setval() fails?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Sebastien FLAESCH <sf(at)4js(dot)com>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: perform setval() fails?
Date: 2020-11-20 17:01:39
Message-ID: 5BA32C03-E9ED-4C6A-AC63-7470E3812247@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> On Nov 20, 2020, at 09:00, Sebastien FLAESCH <sf(at)4js(dot)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(at)thebuild(dot)com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sebastien FLAESCH 2020-11-21 09:26:07 Re: Get last generated serial sequence and set it up when explicit value is used
Previous Message Sebastien FLAESCH 2020-11-20 17:00:10 perform setval() fails?