Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-12-04 Thread Ian Lawrence Barwick
2013/11/8 Tom Lane t...@sss.pgh.pa.us: Albe Laurenz laurenz.a...@wien.gv.at writes: 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

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-12-04 Thread Albe Laurenz
Ian Lawrence Barwick wrote: 2013/11/8 Tom Lane t...@sss.pgh.pa.us: [ thinks for awhile... ] Hm. In principle you can put any expression you want into the tlist during AddForeignUpdateTargets. However, if it's not a Var then the planner won't understand that it's something that needs to be

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-12-04 Thread Ian Lawrence Barwick
2013/12/5 Albe Laurenz laurenz.a...@wien.gv.at: Ian Lawrence Barwick wrote: 2013/11/8 Tom Lane t...@sss.pgh.pa.us: [ thinks for awhile... ] Hm. In principle you can put any expression you want into the tlist during AddForeignUpdateTargets. However, if it's not a Var then the planner won't

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-13 Thread Albe Laurenz
Tomas Vondra wrote: have you found a way to pass data types other than TID as a resjunk column? I'm trying to solve almost the same thing (pass INT8 instead of TID), but I got stuck. Adding a custom Var with INT8OID instead of TIDOID seems to work fine, but I've found no way to populate

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-12 Thread Tomas Vondra
On 8.11.2013 16:13, Albe Laurenz wrote: Tom Lane wrote: Albe Laurenz laurenz.a...@wien.gv.at writes: 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?

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-08 Thread Albe Laurenz
Tom Lane wrote: Albe Laurenz laurenz.a...@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

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-08 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: 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?

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-08 Thread Albe Laurenz
Tom Lane wrote: Albe Laurenz laurenz.a...@wien.gv.at writes: 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

[HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-06 Thread Albe Laurenz
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? Yours,

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-06 Thread Ian Lawrence Barwick
2013/11/6 Albe Laurenz laurenz.a...@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

Re: [HACKERS] FDW: possible resjunk columns in AddForeignUpdateTargets

2013-11-06 Thread Tom Lane
Albe Laurenz laurenz.a...@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