Re: [HACKERS] How to get the 'ctid' from a record type? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] How to get the 'ctid' from a record type?
Date
Msg-id c9b5ef05-ead8-995b-7572-06b4f9eb6e94@openscg.com
Whole thread Raw
In response to Re: [HACKERS] How to get the 'ctid' from a record type?  (Eric Ridge <eebbrr@gmail.com>)
List pgsql-hackers
On 3/10/17 10:31 PM, Eric Ridge wrote:
> What about this?  Is the tuple currently being evaluated (I suppose in
> the case of a sequential scan) available in the context of a function call?

AFAIK that *very* specific case would work, because the executor would 
be handing you the raw tuple. Not a great bet to make though. Also, 
there should be a macro somewhere that will tell you whether you have a 
full tuple or not. You'd want to make sure to check that an throw an 
error if you weren't handed a full tuple.
-- 
Jim Nasby, Chief Data Architect, OpenSCG
http://OpenSCG.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: [HACKERS] INSERT INTO arr2(array[1].d, array[2].d)
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] INSERT INTO arr2(array[1].d, array[2].d)