Re: [HACKERS] Using FDW AddForeignUpdateTargets for a hidden pseudo-column

2016-06-14 Thread Tom Lane
Bernd Helmle writes: > --On 14. Juni 2016 10:32:13 + Albe Laurenz > wrote: >> I first thought of using the internal ROWID column that's probably >> similar to your case, but that wouldn't fit into a tid's 6 bytes, and I >> found that I could

Re: [HACKERS] Using FDW AddForeignUpdateTargets for a hidden pseudo-column

2016-06-14 Thread Aleksey Demakov
A very quick and dirty hack I did in src/backend/optimizer/plan/initsplan.c (in 9.5.3): --- initsplan.c.orig2016-06-14 19:08:27.0 +0600 +++ initsplan.c 2016-06-14 19:10:55.0 +0600 @@ -185,9 +185,12 @@ if (IsA(node, Var)) {

Re: [HACKERS] Using FDW AddForeignUpdateTargets for a hidden pseudo-column

2016-06-14 Thread Bernd Helmle
--On 14. Juni 2016 10:32:13 + Albe Laurenz wrote: > I first thought of using the internal ROWID column that's probably > similar to your case, but that wouldn't fit into a tid's 6 bytes, and I > found that I could only add resjunk columns for existing columns of

Re: [HACKERS] Using FDW AddForeignUpdateTargets for a hidden pseudo-column

2016-06-14 Thread Albe Laurenz
Aleksey Demakov wrote: > I have a data store where tuples have unique identities that normally are not > visible. > I also have a FDW to work with this data store. As per the docs to implement > updates > for this data store I have AddForeignUpdateTargets() function that adds an > artificial >

[HACKERS] Using FDW AddForeignUpdateTargets for a hidden pseudo-column

2016-06-14 Thread Aleksey Demakov
Hi all, I have a data store where tuples have unique identities that normally are not visible. I also have a FDW to work with this data store. As per the docs to implement updates for this data store I have AddForeignUpdateTargets() function that adds an artificial column to the target list.