Re: [EXT] Re: Can we get the CTID value

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Garfield Lewis <garfield(dot)lewis(at)lzlabs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: [EXT] Re: Can we get the CTID value
Date: 2022-01-20 18:53:25
Message-ID: CAKFQuwZSk7X9+YjAp-OGQjPAj+eBERiifTS55evKAvjQMu1V0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 20, 2022 at 11:36 AM Garfield Lewis <garfield(dot)lewis(at)lzlabs(dot)com>
wrote:

> The following knows there is no CTID so shouldn’t I be able to get
> something similar programmatically?
>
> [sysprog(at)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2022-01-20 18:54:04 Re: psql does not provide proper response
Previous Message Bryn Llewellyn 2022-01-20 18:50:01 Re: psql does not provide proper response