Re: Uniquness of ctid - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Uniquness of ctid
Date
Msg-id CAKFQuwYv8K3EtwXaYJhKiW5x54xJH_A=qy=gBXxzP4QvYpHc-g@mail.gmail.com
Whole thread Raw
In response to Uniquness of ctid  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Wed, Jul 19, 2023 at 2:31 PM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/15/ddl-system-columns.html
Description:

Hi,
Looking at the explanation abour ctid, it is "The physical location of the
row version within its table. "
From that line, I think ctid is unique in the table.

Unique but not stable - if you give your actual record an ID value the associated ctid for it may very well change over time and a given ctid can be associated with any number of IDs
And I also think ctid might be unique across the database since it is the
physical location.

The concept doesn't even apply - the value itself only makes sense within a given physical table. i.e., the table is implied. It's like saying "I live at 123 Main St." to someone.  Sure in any given place there can only be a single 123 Main St. but that really isn't useful by itself.  And to extend back to the previous point, you may live there now but you will likely have a different address in the future and someone else will have 123 Main St.

David J.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Uniquness of ctid
Next
From: PG Doc comments form
Date:
Subject: to_char(numeric type, text) rounding instead of truncating