Re: WIP: Faster Expression Processing v4
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
pgsql-hackers@postgresql.org
Date: 2017-03-25T22:17:55Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > - The !caseExpr->defresult result branch is currently unreachable (and > its equivalent was before the patch) because transformCaseExpr() > generates a default expression. I'm inclined to replace the dead code > with an assertion. Any reason not to do that? Ah-hah. I'd noted that that code wasn't being reached when I did some code coverage checks this morning, but I hadn't found the cause yet. Yeah, replacing the if-test with an assert seems fine. > I think there's some argument to be made that we should move all of > execSRF.c's logic to their respective callsites. There's not really > much shared code: ExecEvalFuncArgs(), tupledesc_match(), init_sexpr() - > and at least the latter would even become a bit simpler if we didn't > support both callers. Possibly. All that code could stand to be rethought, probably, now that its mission is just to handle the SRF case. But at least all the cruft is in one place for the moment. And I don't think it's anything we have to fix before v10, it's just cosmetic. > Thanks a lot for your work on the patch! You're welcome! regards, tom lane
Commits
-
Improve performance of ExecEvalWholeRowVar.
- 2f0903ea1965 10.0 landed
-
Remove unreachable code in expression evaluation.
- ad46a2aa79f9 10.0 landed
-
Faster expression evaluation and targetlist projection.
- b8d7f053c5c2 10.0 landed
-
Avoid syntax error on platforms that have neither LOCALE_T nor ICU.
- 457a44487328 10.0 cited
-
Add configure test to see if the C compiler has gcc-style computed gotos.
- bc18126a6bcb 10.0 landed
-
Improve regression test coverage for TID scanning.
- be6c3d19fd45 10.0 landed
-
Improve expression evaluation test coverage.
- ce38949ba23a 10.0 landed
-
Fix two errors with nested CASE/WHEN constructs.
- f0c7b789ab12 9.6.0 cited