Re: [EXT] Re: Can we get the CTID value - Mailing list pgsql-general

From David G. Johnston
Subject Re: [EXT] Re: Can we get the CTID value
Date
Msg-id CAKFQuwZSk7X9+YjAp-OGQjPAj+eBERiifTS55evKAvjQMu1V0g@mail.gmail.com
Whole thread Raw
In response to Re: [EXT] Re: Can we get the CTID value  (Garfield Lewis <garfield.lewis@lzlabs.com>)
List pgsql-general
On Thu, Jan 20, 2022 at 11:36 AM Garfield Lewis <garfield.lewis@lzlabs.com> wrote:
The following knows there is no CTID so shouldn’t I be able to get something similar programmatically?

[sysprog@nucky lz_pgmod] (h-master-LZRDB-4714)*$ psql -U postgres -d postgres -c "select ctid, 'test'"
ERROR:  column "ctid" does not exist
LINE 1: select ctid, 'test'

All that shows is that a column named ctid is not presently in scope (the absence of a table and use of a name for the column guarantees that).  That "ctid" and the system column named "ctid" are utterly unrelated; they just happen to share the same character sequence.

Data values do not have any concept of their surrounding context.  They are just, basically, POJO or JSON Objects.  They are created and passed around never caring how they were born or how they might die, they just live in the moment.

That is how it is and I suspect no amount of arguing would convince us to complicate things.

David J.


pgsql-general by date:

Previous
From: Bryn Llewellyn
Date:
Subject: Re: psql does not provide proper response
Next
From: Pavel Stehule
Date:
Subject: Re: psql does not provide proper response