Re: update table sequence - Mailing list pgsql-sql

From Tom Lane
Subject Re: update table sequence
Date
Msg-id 25935.984773390@sss.pgh.pa.us
Whole thread Raw
In response to update table sequence  (e.ellenkamp@copernicus-it.nl (Egbert Ellenkamp))
List pgsql-sql
e.ellenkamp@copernicus-it.nl (Egbert Ellenkamp) writes:
> select setval('mytable_myrowid_seq',select max(myrowid) from mytable);

That should work if you put in the required parentheses around the
sub-select:

select setval('mytable_myrowid_seq', (select max(myrowid) from mytable));
        regards, tom lane


pgsql-sql by date:

Previous
From: David Olbersen
Date:
Subject: Re: Select very slow...
Next
From: jreniz
Date:
Subject: Trigger problem