Hello you can't to do it directly. Expression cannot be used instead object name you can use a plpgsql DO in this moment DO $$ BEGIN EXECUTE format('ALTER SEQUENCE %I RESTART WITH 1', pg_get_serial_sequence('table', 'id')); END; $$ LANGUAGE plpgsql; Regards Pavel Stehule 2012/11/24 Peter Kroon <plakroon@xxxxxxxxx>: > ALTER SEQUENCE (select pg_get_serial_sequence('table', 'id')) RESTART WITH > 1; -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general