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

From Ian Lawrence Barwick
Subject Re: FDW: possible resjunk columns in AddForeignUpdateTargets
Date
Msg-id CAB8KJ=jrsium0CpzCmR+F1S+3=gMjzP+9X1KJ+9uZDHuYigy9w@mail.gmail.com
Whole thread Raw
In response to FDW: possible resjunk columns in AddForeignUpdateTargets  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-hackers
2013/11/6 Albe Laurenz <laurenz.albe@wien.gv.at>:
> 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?

My understanding (having recently had a crack at getting an FDW working)
is that the name can be arbitrary within reason - at least that's what
I get from this bit of the documentation:

> To do that, add TargetEntry items to parsetree->targetList, containing
> expressions for the extra values to be fetched. Each such entry must
> be marked resjunk = true, and > must have a distinct resname that will
> identify it at execution time. Avoid using names matching ctidN or
> wholerowN, as the core system can generate junk columns of these names.

http://www.postgresql.org/docs/9.3/interactive/fdw-callbacks.html#FDW-CALLBACKS-UPDATE

Someone more knowledgeable than myself will know better, I hope.

Regards

Ian Barwick



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: git diff --check whitespace checks, gitattributes
Next
From: Alvaro Herrera
Date:
Subject: Re: ERROR during end-of-xact/FATAL