Re: Using CTID system column as a "temporary" primary key

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Using CTID system column as a "temporary" primary key
Date: 2023-03-28 10:20:47
Message-ID: CAEzk6feEGHzS_TexvevFmWhsYt7MYhUUEUE54stO7SPNbL_Ypg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 28 Mar 2023 at 10:28, Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastien Flaesch 2023-03-28 10:24:46 Re: Using CTID system column as a "temporary" primary key
Previous Message Sebastien Flaesch 2023-03-28 09:57:12 Re: Using CTID system column as a "temporary" primary key