Re: Resetting identity columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ray O'Donnell" <ray(at)rodonnell(dot)ie>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "'PostgreSQL'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Resetting identity columns
Date: 2019-04-22 17:49:30
Message-ID: 19592.1555955370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Ray O'Donnell" <ray(at)rodonnell(dot)ie> writes:
> In general, then, is it not possible to use an expression thus? -

> [...] ALTER COLUMN [...] RESTART WITH <expression here>

No. In general, PG's utility commands (everything except SELECT/
INSERT/UPDATE/DELETE) don't do expression evaluation. Partly this
is laziness or lack of round tuits, but in some cases there are
also interesting semantic problems.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-04-22 19:27:41 Re: Resetting identity columns
Previous Message Ray O'Donnell 2019-04-22 17:08:19 Re: Resetting identity columns