From: | Garfield Lewis <garfield(dot)lewis(at)lzlabs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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:36:08 |
Message-ID: | 91151F3E-6983-4CD1-B643-16486E5F228D@lzlabs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2022-01-20, 1:11 PM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> No, it's the same problem in reverse: the output function cannot
> know where the value came from. There is no hard and fast
> reason that it must have come out of a table, either. Consider
> something as simple as
>
> SELECT 'blah blah'::yourtype;
>
> This'll invoke the type's input function to parse the literal string,
> and later it'll invoke the output function to reconstruct a string
>
> to send to the client, and there's no table involved.
>
> regards, tom lane
Understood, however, my last question/comment would be shouldn't the example above just result in a CTID something like (x,y) where x and y are some known UNKNOWN/INVALID values or something else representing the fact that there is no current CTID associated with the element? Basically, what I am saying is shouldn't any search for a CTID in the case just return some value to indicate the CTID doesn't exist or is UNKNOWN/INVALID?
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'
^
Regards,
Garfield
From | Date | Subject | |
---|---|---|---|
Next Message | Bryn Llewellyn | 2022-01-20 18:50:01 | Re: psql does not provide proper response |
Previous Message | Tom Lane | 2022-01-20 18:11:04 | Re: [EXT] Re: Can we get the CTID value |