Re: Getting rid of SQLValueFunction
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Ted Yu <yuzhihong@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Corey Huinker <corey.huinker@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-20T23:12:07Z
Lists: pgsql-hackers
Attachments
- v5-0001-Replace-SQLValueFunction-by-direct-function-calls.patch (text/x-diff) patch v5-0001
- v5-0002-Simplify-back-parsing-of-SQL-callable-timestamp-f.patch (text/x-diff) patch v5-0002
On Sun, Nov 20, 2022 at 08:21:10AM -0800, Ted Yu wrote: > For get_func_sql_syntax(), the code for cases > of F_CURRENT_TIME, F_CURRENT_TIMESTAMP, F_LOCALTIME and F_LOCALTIMESTAMP is > mostly the same. > Maybe we can introduce a helper so that code duplication is reduced. It would. Thanks for the suggestion. Do you like something like the patch 0002 attached? This reduces a bit the overall size of the patch. Both ought to be merged in the same commit, still it is easier to see the simplification created. -- Michael
Commits
-
Fix precision handling for some COERCE_SQL_SYNTAX functions
- 7aa81c61ec8f 16.0 landed
-
Replace SQLValueFunction by COERCE_SQL_SYNTAX
- f193883fc9ce 16.0 landed
-
Switch SQLValueFunction on "name" to use COERCE_SQL_SYNTAX
- fb32748e32e2 16.0 landed
-
Improve coverage of ruleutils.c for SQLValueFunctions
- 2e0d80c5bb72 16.0 landed