Re: [EXT] Re: Can we get the CTID value
| От | Garfield Lewis |
|---|---|
| Тема | Re: [EXT] Re: Can we get the CTID value |
| Дата | |
| Msg-id | 91151F3E-6983-4CD1-B643-16486E5F228D@lzlabs.com обсуждение исходный текст |
| Ответ на | Re: [EXT] Re: Can we get the CTID value (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: [EXT] Re: Can we get the CTID value
|
| Список | pgsql-general |
On 2022-01-20, 1:11 PM, "Tom Lane" <tgl@sss.pgh.pa.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
currentCTID associated with the element? Basically, what I am saying is shouldn't any search for a CTID in the case
justreturn 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@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
В списке pgsql-general по дате отправления: