Re: FDW: possible resjunk columns in AddForeignUpdateTargets - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: FDW: possible resjunk columns in AddForeignUpdateTargets
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17C57B24@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: FDW: possible resjunk columns in AddForeignUpdateTargets  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FDW: possible resjunk columns in AddForeignUpdateTargets
List pgsql-hackers
Tom Lane wrote:
> Albe Laurenz <laurenz.albe@wien.gv.at> writes:
>> I have a question concerning the Foreign Data Wrapper API:
>> I find no mention of this in the documentation, but I remember that
>> you can only add a resjunk column that matches an existing attribute
>> of the foreign table and not one with an arbitrary name or
>> definition.
> 
>> Ist that right?
> 
> I don't recall such a limitation offhand.  It's probably true that
> you can't create Vars that don't match some declared column of the
> table, but that doesn't restrict what you put into resjunk columns
> AFAIR.

I am confused, probably due to lack of knowledge.

What I would like to do is add a custom resjunk column
(e.g. a bytea) in AddForeignUpdateTargets that carries a row identifier
from the scan state to the modify state.
Would that be possible? Can I have anything else than a Var
in a resjunk column?

Yours,
Laurenz Albe

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ERROR during end-of-xact/FATAL
Next
From: Tom Lane
Date:
Subject: Re: FDW: possible resjunk columns in AddForeignUpdateTargets