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

From Ted Yu
Subject Re: Getting rid of SQLValueFunction
Date
Msg-id CALte62zPfFW7R4r1otJ6OBYd_=SeOpO82F--n=Y7VgqhjpasBA@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 Sun, Nov 20, 2022 at 3:12 PM Michael Paquier <michael@paquier.xyz> wrote:
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
Hi,
Thanks for the quick response.

+ * timestamp.  These require a specific handling with their typmod is given
+ * by the function caller through their SQL keyword. 

typo: typmod is given -> typmod given

Other than the above, code looks good to me.

Cheers

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add LZ4 compression in pg_dump
Next
From: Andres Freund
Date:
Subject: Re: Split index and table statistics into different types of stats