From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ray O'Donnell <ray@rodonnell.ie>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: 'PostgreSQL' <pgsql-general@postgresql.org>
Subject: Re: Resetting identity columns
Date: Mon, 22 Apr 2019 13:49:30 -0400
Message-ID: <19592.1555955370@sss.pgh.pa.us> (raw)
In-Reply-To: <2864b568-76cf-c84b-52e6-8adee24962c3@rodonnell.ie>
References: <5db0ed5c-00ba-65fa-92f0-7e02c1495d18@rodonnell.ie>
<a1c07c88-ac43-992f-52c8-9a1e8318ee90@aklaver.com>
<2864b568-76cf-c84b-52e6-8adee24962c3@rodonnell.ie>
"Ray O'Donnell" <ray@rodonnell.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ray@rodonnell.ie, adrian.klaver@aklaver.com
Subject: Re: Resetting identity columns
In-Reply-To: <19592.1555955370@sss.pgh.pa.us>
References: <5db0ed5c-00ba-65fa-92f0-7e02c1495d18@rodonnell.ie> <a1c07c88-ac43-992f-52c8-9a1e8318ee90@aklaver.com> <2864b568-76cf-c84b-52e6-8adee24962c3@rodonnell.ie> <19592.1555955370@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox