Re: Using CTID system column as a "temporary" primary key
Geoff Winkless <pgsqladmin@geoff.dj>
From: Geoff Winkless <pgsqladmin@geoff.dj>
To: Sebastien Flaesch <sebastien.flaesch@4js.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Date: 2023-03-28T10:20:47Z
Lists: pgsql-general
On Tue, 28 Mar 2023 at 10:28, Sebastien Flaesch <sebastien.flaesch@4js.com> wrote: > Is the CTID a good choice? > I think if you're honest with yourself you already know the answer to this question. The only real solution is to update the legacy code to use the primary key, or (if that's not possible) change the table definition to add your own indexed BIGSERIAL value called "ROWID" to the rows and use that instead (assuming it will be large enough). Geoff