Re: elog() error, trying CURENT OF with foreign table
От | Tom Lane |
---|---|
Тема | Re: elog() error, trying CURENT OF with foreign table |
Дата | |
Msg-id | 19401.1366393092@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: elog() error, trying CURENT OF with foreign table (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
I wrote: > Robert Haas <robertmhaas@gmail.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
В списке pgsql-hackers по дате отправления: