diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
| -rw-r--r-- | src/include/catalog/pg_proc.dat | 17 | ||||
| -rw-r--r-- | src/include/executor/execExpr.h | 8 | ||||
| -rw-r--r-- | src/include/nodes/primnodes.h | 33 | ||||
| -rw-r--r-- | src/include/utils/date.h | 4 | ||||
| -rw-r--r-- | src/include/utils/timestamp.h | 4 |
6 files changed, 18 insertions, 50 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index ac2043f6cc..49e9dc4a94 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202211201 +#define CATALOG_VERSION_NO 202211211 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index fd2559442e..f15aa2dbb1 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -1520,6 +1520,23 @@ { oid => '9977', descr => 'system user name', proname => 'system_user', provolatile => 's', prorettype => 'text', proargtypes => '', prosrc => 'system_user' }, +{ oid => '9978', descr => 'current date', + proname => 'current_date', provolatile => 's', prorettype => 'date', + proargtypes => '', prosrc => 'current_date' }, +{ oid => '9979', descr => 'current time', + proname => 'current_time', proisstrict => 'f', provolatile => 's', + prorettype => 'timetz', proargtypes => 'int4', prosrc => 'current_time' }, +{ oid => '9980', descr => 'current timestamp', + proname => 'current_timestamp', proisstrict => 'f', provolatile => 's', + prorettype => 'timestamptz', proargtypes => 'int4', + prosrc => 'current_timestamp' }, +{ oid => '9981', descr => 'local time', + proname => 'localtime', proisstrict => 'f', provolatile => 's', + prorettype => 'time', proargtypes => 'int4', prosrc => 'sql_localtime' }, +{ oid => '9982', descr => 'local timestamp', + proname => 'localtimestamp', proisstrict => 'f', provolatile => 's', + prorettype => 'timestamp', proargtypes => 'int4', + prosrc => 'sql_localtimestamp' }, { oid => '744', proname => 'array_eq', prorettype => 'bool', diff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.h index e14f15d435..0557302b92 100644 --- a/src/include/executor/execExpr.h +++ b/src/include/executor/execExpr.h @@ -170,7 +170,6 @@ typedef enum ExprEvalOp EEOP_DISTINCT, EEOP_NOT_DISTINCT, EEOP_NULLIF, - EEOP_SQLVALUEFUNCTION, EEOP_CURRENTOFEXPR, EEOP_NEXTVALUEEXPR, EEOP_ARRAYEXPR, @@ -416,12 +415,6 @@ typedef struct ExprEvalStep FunctionCallInfo fcinfo_data_in; } iocoerce; - /* for EEOP_SQLVALUEFUNCTION */ - struct - { - SQLValueFunction *svf; - } sqlvaluefunction; - /* for EEOP_NEXTVALUEEXPR */ struct { @@ -741,7 +734,6 @@ extern void ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext); extern void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op, ExprContext *econtext); -extern void ExecEvalSQLValueFunction(ExprState *state, ExprEvalStep *op); extern void ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op); extern void ExecEvalNextValueExpr(ExprState *state, ExprEvalStep *op); extern void ExecEvalRowNull(ExprState *state, ExprEvalStep *op, diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index f6dd27edcc..74f228d959 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -1293,39 +1293,6 @@ typedef struct MinMaxExpr } MinMaxExpr; /* - * SQLValueFunction - parameterless functions with special grammar productions - * - * The SQL standard categorizes some of these as <datetime value function> - * and others as <general value specification>. We call 'em SQLValueFunctions - * for lack of a better term. We store type and typmod of the result so that - * some code doesn't need to know each function individually, and because - * we would need to store typmod anyway for some of the datetime functions. - * Note that currently, all variants return non-collating datatypes, so we do - * not need a collation field; also, all these functions are stable. - */ -typedef enum SQLValueFunctionOp -{ - SVFOP_CURRENT_DATE, - SVFOP_CURRENT_TIME, - SVFOP_CURRENT_TIME_N, - SVFOP_CURRENT_TIMESTAMP, - SVFOP_CURRENT_TIMESTAMP_N, - SVFOP_LOCALTIME, - SVFOP_LOCALTIME_N, - SVFOP_LOCALTIMESTAMP, - SVFOP_LOCALTIMESTAMP_N -} SQLValueFunctionOp; - -typedef struct SQLValueFunction -{ - Expr xpr; - SQLValueFunctionOp op; /* which function this is */ - Oid type; /* result type/typmod */ - int32 typmod; - int location; /* token location, or -1 if unknown */ -} SQLValueFunction; - -/* * XmlExpr - various SQL/XML functions requiring special grammar productions * * 'name' carries the "NAME foo" argument (already XML-escaped). diff --git a/src/include/utils/date.h b/src/include/utils/date.h index 0bbe889128..fad4878722 100644 --- a/src/include/utils/date.h +++ b/src/include/utils/date.h @@ -96,7 +96,6 @@ TimeTzADTPGetDatum(const TimeTzADT *X) /* date.c */ -extern int32 anytime_typmod_check(bool istz, int32 typmod); extern double date2timestamp_no_overflow(DateADT dateVal); extern Timestamp date2timestamp_opt_overflow(DateADT dateVal, int *overflow); extern TimestampTz date2timestamptz_opt_overflow(DateADT dateVal, int *overflow); @@ -104,9 +103,6 @@ extern int32 date_cmp_timestamp_internal(DateADT dateVal, Timestamp dt2); extern int32 date_cmp_timestamptz_internal(DateADT dateVal, TimestampTz dt2); extern void EncodeSpecialDate(DateADT dt, char *str); -extern DateADT GetSQLCurrentDate(void); -extern TimeTzADT *GetSQLCurrentTime(int32 typmod); -extern TimeADT GetSQLLocalTime(int32 typmod); extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); extern int tm2time(struct pg_tm *tm, fsec_t fsec, TimeADT *result); diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 76b7b4a3ca..7fd0b58825 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -93,11 +93,7 @@ extern PGDLLIMPORT TimestampTz PgReloadTime; /* 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 long TimestampDifferenceMilliseconds(TimestampTz start_time, |
