Re: Getting rid of SQLValueFunction

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Corey Huinker <corey.huinker@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-18T01:23:58Z
Lists: pgsql-hackers
On Tue, Oct 25, 2022 at 02:20:12PM +0900, Michael Paquier wrote:
> Attached is a rebased patch set, as of the conflicts from 2e0d80c.

So, this patch set has been sitting in the CF app for a few weeks now,
and I would like to apply them to remove a bit of code from the
executor.

Please note that in order to avoid tweaks when choosing the attribute
name of function call, this needs a total of 8 new catalog functions
mapping to the SQL keywords, which is what the test added by 2e0d80c
is about:
- current_role
- user
- current_catalog
- current_date
- current_time
- current_timestamp
- localtime
- localtimestamp

Any objections?
--
Michael

Commits

  1. Fix precision handling for some COERCE_SQL_SYNTAX functions

  2. Replace SQLValueFunction by COERCE_SQL_SYNTAX

  3. Switch SQLValueFunction on "name" to use COERCE_SQL_SYNTAX

  4. Improve coverage of ruleutils.c for SQLValueFunctions