aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-05-26 19:25:19 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-05-26 19:26:12 -0400
commit6d24189b417dfcedc5815a9f1533555b2dfe891c (patch)
tree8b2d604c4edafd6dfcbd2fa3f76beefff4a0c5ed /src/backend/access/gist/gistutil.c
parentea393e4973b0ca1db1c1bab9323e072dc5261477 (diff)
downloadpostgresql-6d24189b417dfcedc5815a9f1533555b2dfe891c.tar.gz
postgresql-6d24189b417dfcedc5815a9f1533555b2dfe891c.zip
Make decompilation of optimized CASE constructs more robust.
We had some hacks in ruleutils.c to cope with various odd transformations that the optimizer could do on a CASE foo WHEN "CaseTestExpr = RHS" clause. However, the fundamental impossibility of covering all cases was exposed by Heikki, who pointed out that the "=" operator could get replaced by an inlined SQL function, which could contain nearly anything at all. So give up on the hacks and just print the expression as-is if we fail to recognize it as "CaseTestExpr = RHS". (We must cover that case so that decompiled rules print correctly; but we are not under any obligation to make EXPLAIN output be 100% valid SQL in all cases, and already could not do so in some other cases.) This approach requires that we have some printable representation of the CaseTestExpr node type; I used "CASE_TEST_EXPR". Back-patch to all supported branches, since the problem case fails in all.
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions