• Tom Lane's avatar
    Reimplement CASE val WHEN compval1 THEN ... WHEN compval2 THEN ... END · 55f7c330
    Tom Lane authored
    so that the 'val' is computed only once, per recent discussion.  The
    speedup is not much when 'val' is just a simple variable, but could be
    significant for larger expressions.  More importantly this avoids issues
    with multiple evaluations of a volatile 'val', and it allows the CASE
    expression to be reverse-listed in its original form by ruleutils.c.
    55f7c330
copyfuncs.c 57.3 KB