From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: elog() error, trying CURENT OF with foreign table |
Date: | 2013-04-19 17:38:12 |
Message-ID: | 19401.1366393092@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> My main concern was actually whether we ought to be detecting this
>> earlier in the process, before it gets as far as the executor.
> Yeah, that might be an appropriate response too. The executor is
> coded so cavalierly because it expects the planner to have replaced
> the CURRENT OF node with something executable. As things now stand,
> whether that happens or not depends in part on the behavior of FDWs,
> so maybe we'd better have the planner check whether it happened.
> I'm not sure though if there's any suitably-painless place to do it.
After looking at this a bit, my memory was faulty: the CurrentOfExpr
isn't really transformed to something else, we just make sure it ends up
in a TidScan node's tidqual list, where it won't be executed in the
normal way. The equivalent thing for a foreign table would be for the
FDW's execution code to have special smarts about what to do with a
CurrentOfExpr qual. So there's no way for the core planner to know
whether a ForeignScan incorporating a CurrentOfExpr qual is OK or not.
Short of a major redesign of the way this is handled, treating the
execution-time error as user-facing seems like the thing to do.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2013-04-19 20:57:24 | Re: confusing message about archive failures |
Previous Message | Florian Pflug | 2013-04-19 16:59:59 | Re: Inconsistent DB data in Streaming Replication |