Re: Using CTID system column as a "temporary" primary key - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Using CTID system column as a "temporary" primary key
Date
Msg-id BDED177C-F85C-4667-A67C-C083DD76A9E2@thebuild.com
Whole thread Raw
In response to Re: Using CTID system column as a "temporary" primary key  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Responses Re: Using CTID system column as a "temporary" primary key  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
List pgsql-general

> On Mar 28, 2023, at 03:39, Sebastien Flaesch <sebastien.flaesch@4js.com> wrote:
> Do I have to cast() ?

Yes:

    select * from t where ctid='(0,1)'::tid;

The string representation can be up to 17 characters: 10 for the page number, 4 for the tuple number, and three for the
delimiters.

Remember that updating a row changes its CTID.


pgsql-general by date:

Previous
From: Sebastien Flaesch
Date:
Subject: Re: Using CTID system column as a "temporary" primary key
Next
From: Dominique Devienne
Date:
Subject: Plans for ON DELETE CASCADE? Which index is used, if at all?