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

2013-12-04 Thread Ian Lawrence Barwick
2013/12/5 Albe Laurenz : > Ian Lawrence Barwick wrote: >> 2013/11/8 Tom Lane : >>> [ 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

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

2013-12-04 Thread Albe Laurenz
Ian Lawrence Barwick wrote: > 2013/11/8 Tom Lane : >> [ 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 supplied b

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

2013-12-04 Thread Ian Lawrence Barwick
2013/11/8 Tom Lane : > Albe Laurenz 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 resjun

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 populat

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 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 h

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

2013-11-08 Thread Albe Laurenz
Tom Lane wrote: > Albe Laurenz 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 col

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

2013-11-08 Thread Tom Lane
Albe Laurenz 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? [ thinks for awhi

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

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

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

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

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

2013-11-06 Thread Ian Lawrence Barwick
2013/11/6 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 > definit