summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorAlvaro Herrera2018-07-10 19:19:40 +0000
committerAlvaro Herrera2018-07-10 19:19:40 +0000
commitb6e3a3a492dbf2043e4b149221007716ba9e364e (patch)
treef84a9b1db626d1cbbfce246fa49afd2dc3fa6f4e /src/backend/access/gist/gistutil.c
parentbcbd940806a2011d6f99ae72ea5897e8a94c6093 (diff)
Better handle pseudotypes as partition keys
We fail to handle polymorphic types properly when they are used as partition keys: we were unnecessarily adding a RelabelType node on top, which confuses code examining the nodes. In particular, this makes predtest.c-based partition pruning not to work, and ruleutils.c to emit expressions that are uglier than needed. Fix it by not adding RelabelType when not needed. In master/11 the new pruning code is separate so it doesn't suffer from this problem, since we already fixed it (in essentially the same way) in e5dcbb88a15d, which also added a few tests; back-patch those tests to pg10 also. But since UPDATE/DELETE still uses predtest.c in pg11, this change improves partitioning for those cases too. Add tests for this. The ruleutils.c behavior change is relevant in pg11/master too. Co-authored-by: Amit Langote <[email protected]> Co-authored-by: Álvaro Herrera <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Reviewed-by: Robert Haas <[email protected]> Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions