alter sequence + subqueries - Mailing list pgsql-sql

From jeff sacksteder
Subject alter sequence + subqueries
Date
Msg-id 51c8a7be050916153613795e1a@mail.gmail.com
Whole thread Raw
Responses Re: alter sequence + subqueries
Re: alter sequence + subqueries
List pgsql-sql
The postgres-specific sql extension 'ALTER SEQUENCE' does not appear to support subqueries.<br /><br /> I have inserted
somedata into a table, including values in the primary key. I want to reset the associated sequence so that any further
recordsto be inserted into that table  resume numbering correctly. The statement I attempted was:<br /><br /> ALTER
SEQUENCEfoo_id_seq <br /> RESTART WITH (SELECT max(id) FROM foo);<br /><br /> Is this syntax correct and supported?<br
/><br/>  <br /> 

pgsql-sql by date:

Previous
From: Daryl Richter
Date:
Subject: Re: showing multiple REFERENCE details of id fields in single
Next
From: Kenneth Dombrowski
Date:
Subject: plpgsql function not accepting NULL value