Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.
От | Robert Haas |
---|---|
Тема | Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled. |
Дата | |
Msg-id | CA+TgmobR9XWEhmF3s_WsoLNnnjaFyS_xtbrVG3dCGiUgof20Nw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Expression errors with "FOR UPDATE" and postgres_fdw with partitionwise join enabled. (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>) |
Ответы |
Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.
Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled. |
Список | pgsql-hackers |
On Wed, Jul 18, 2018 at 8:00 AM, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> wrote: > [ new patch ] + /* + * If the child plan is an Append or MergeAppend, the targetlists of its + * subplans would have already been adjusted before we get here, so need + * to work here. + */ + if (IsA(subplan, Append) || IsA(subplan, MergeAppend)) + return; + + /* The child plan should be a scan or join */ + Assert(is_projection_capable_plan(subplan)); This looks like a terrible design to me. If somebody in future invents a new plan type that is not projection-capable, then this could fail an assertion here and there won't be any simple fix. And if you reach here and the child targetlists somehow haven't been adjusted, then you won't even fail an assertion, you'll just crash (or maybe return wrong answers). I'm going to study this some more now, but I really think this is going in the wrong direction. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: