mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Improve parsetree representation of special functions such as CURRENT_DATE.
We implement a dozen or so parameterless functions that the SQL standard defines special syntax for. Up to now, that was done by converting them into more or less ad-hoc constructs such as "'now'::text::date". That's messy for multiple reasons: it exposes what should be implementation details to users, and performance is worse than it needs to be in several cases. To improve matters, invent a new expression node type SQLValueFunction that can represent any of these parameterless functions. Bump catversion because this changes stored parsetrees for rules. Discussion: <30058.1463091294@sss.pgh.pa.us>
This commit is contained in:
@@ -215,7 +215,11 @@ extern Datum generate_series_timestamptz(PG_FUNCTION_ARGS);
|
||||
|
||||
/* Internal routines (not fmgr-callable) */
|
||||
|
||||
extern int32 anytimestamp_typmod_check(bool istz, int32 typmod);
|
||||
|
||||
extern TimestampTz GetCurrentTimestamp(void);
|
||||
extern TimestampTz GetSQLCurrentTimestamp(int32 typmod);
|
||||
extern Timestamp GetSQLLocalTimestamp(int32 typmod);
|
||||
extern void TimestampDifference(TimestampTz start_time, TimestampTz stop_time,
|
||||
long *secs, int *microsecs);
|
||||
extern bool TimestampDifferenceExceeds(TimestampTz start_time,
|
||||
|
||||
Reference in New Issue
Block a user