pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Uniquness of ctid
2+ messages / 2 participants
[nested] [flat]

* Uniquness of ctid
@ 2023-07-19 17:21 PG Doc comments form <noreply@postgresql.org>
  2023-07-19 21:39 ` Re: Uniquness of ctid David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2023-07-19 17:21 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: heonieb@gmail.com

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.
And I also think ctid might be unique across the database since it is the
physical location.
But I was not sure about this.
Please confirm if my assumption is right or not.

Thanks
Brian


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Uniquness of ctid
  2023-07-19 17:21 Uniquness of ctid PG Doc comments form <noreply@postgresql.org>
@ 2023-07-19 21:39 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2023-07-19 21:39 UTC (permalink / raw)
  To: heonieb@gmail.com; pgsql-docs@lists.postgresql.org

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-07-19 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 17:21 Uniquness of ctid PG Doc comments form <noreply@postgresql.org>
2023-07-19 21:39 ` David G. Johnston <david.g.johnston@gmail.com>

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