From f193883fc9cebe8fa20359b0797832837a788112 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 21 Nov 2022 18:31:59 +0900 Subject: Replace SQLValueFunction by COERCE_SQL_SYNTAX This switch impacts 9 patterns related to a SQL-mandated special syntax for function calls: - LOCALTIME [ ( typmod ) ] - LOCALTIMESTAMP [ ( typmod ) ] - CURRENT_TIME [ ( typmod ) ] - CURRENT_TIMESTAMP [ ( typmod ) ] - CURRENT_DATE Five new entries are added to pg_proc to compensate the removal of SQLValueFunction to provide backward-compatibility and making this change transparent for the end-user (for example for the attribute generated when a keyword is specified in a SELECT or in a FROM clause without an alias, or when specifying something else than an Iconst to the parser). The parser included a set of checks coming from the files in charge of holding the C functions used for the SQLValueFunction calls (as of transformSQLValueFunction()), which are now moved within each function's execution path, so this reduces the dependencies between the execution and the parsing steps. As of this change, all the SQL keywords use the same paths for their work, relying only on COERCE_SQL_SYNTAX. Like fb32748, no performance difference has been noticed, while the perf profiles get reduced with ExecEvalSQLValueFunction() gone. Bump catalog version. Reviewed-by: Corey Huinker, Ted Yu Discussion: https://postgr.es/m/YzaG3MoryCguUOym@paquier.xyz --- src/backend/jit/llvm/llvmjit_expr.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/backend/jit/llvm/llvmjit_expr.c') diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c index 95d0807bdde..f114337f8e0 100644 --- a/src/backend/jit/llvm/llvmjit_expr.c +++ b/src/backend/jit/llvm/llvmjit_expr.c @@ -1549,12 +1549,6 @@ llvm_compile_expr(ExprState *state) break; } - case EEOP_SQLVALUEFUNCTION: - build_EvalXFunc(b, mod, "ExecEvalSQLValueFunction", - v_state, op); - LLVMBuildBr(b, opblocks[opno + 1]); - break; - case EEOP_CURRENTOFEXPR: build_EvalXFunc(b, mod, "ExecEvalCurrentOfExpr", v_state, op); -- cgit v1.2.3