Re: Getting rid of SQLValueFunction - Mailing list pgsql-hackers

From Ted Yu
Subject Re: Getting rid of SQLValueFunction
Date
Msg-id CALte62zqVGYMUbJb4oD8xzAc_0t02wBLEPKHsxMmUwA2+qVsHA@mail.gmail.com
Whole thread Raw
In response to Re: Getting rid of SQLValueFunction  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Getting rid of SQLValueFunction
List pgsql-hackers


On Sat, Nov 19, 2022 at 7:01 PM Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Nov 18, 2022 at 10:23:58AM +0900, Michael Paquier wrote:
> 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?

Hearing nothing, I have gone through 0001 again and applied it as
fb32748 to remove the dependency between names and SQLValueFunction.
Attached is 0002, to bring back the CI to a green state.
--
Michael

Hi,
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.

Cheers 

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: ssl tests aren't concurrency safe due to get_free_port()
Next
From: Simon Riggs
Date:
Subject: Re: Slow standby snapshot