Hitoshi Harada <umi.tan...@gmail.com> writes: > ... I tried to change not to canonicalize the > pathkeys in make_pathkeys_window() in such cases and succeeded then > passed all regression tests.
That's broken, whether it passes regression tests or not. Not canonicalizing will mean that you fail to recognize equality to canonicalized pathkeys, and thus for example execute unnecessary sorts. I haven't looked at the patch, but it sounds a bit like you are trying to put logic into the executor that needs to be in the planner. If the executor is guessing about what the planner did, that's a design failure. The planner should figure out what needs to happen and tell the executor exactly what to do, eg, which columns need to be compared to determine partition membership. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers