aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-12-09 16:07:49 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-12-09 16:07:49 -0500
commitc60488b4748b4316f1c92d62457671046e5c8994 (patch)
tree3868154eb7b042e1fa6bca2e0f581b5c8e28b5b6 /src/include/utils
parent2661469d862239ea8b9e3a1cf5352d833f6f0fec (diff)
downloadpostgresql-c60488b4748b4316f1c92d62457671046e5c8994.tar.gz
postgresql-c60488b4748b4316f1c92d62457671046e5c8994.zip
Convert datetime input functions to use "soft" error reporting.
This patch converts the input functions for date, time, timetz, timestamp, timestamptz, and interval to the new soft-error style. There's some related stuff in formatting.c that remains to be cleaned up, but that seems like a separable project. Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/datetime.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index bb70b754491..bdb7c06bec9 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -16,7 +16,6 @@
#ifndef DATETIME_H
#define DATETIME_H
-#include "nodes/nodes.h"
#include "utils/timestamp.h"
/* this struct is declared in utils/tzparser.h: */
@@ -318,8 +317,8 @@ extern int DecodeISO8601Interval(char *str,
int *dtype, struct pg_itm_in *itm_in);
extern void DateTimeParseError(int dterr, DateTimeErrorExtra *extra,
- const char *str,
- const char *datatype) pg_attribute_noreturn();
+ const char *str, const char *datatype,
+ struct Node *escontext);
extern int DetermineTimeZoneOffset(struct pg_tm *tm, pg_tz *tzp);
extern int DetermineTimeZoneAbbrevOffset(struct pg_tm *tm, const char *abbr, pg_tz *tzp);
@@ -343,7 +342,7 @@ extern int DecodeUnits(int field, const char *lowtoken, int *val);
extern int j2day(int date);
-extern Node *TemporalSimplify(int32 max_precis, Node *node);
+extern struct Node *TemporalSimplify(int32 max_precis, struct Node *node);
extern bool CheckDateTokenTables(void);
@@ -351,8 +350,7 @@ extern TimeZoneAbbrevTable *ConvertTimeZoneAbbrevs(struct tzEntry *abbrevs,
int n);
extern void InstallTimeZoneAbbrevs(TimeZoneAbbrevTable *tbl);
-extern void AdjustTimestampForTypmod(Timestamp *time, int32 typmod);
-extern bool AdjustTimestampForTypmodError(Timestamp *time, int32 typmod,
- bool *error);
+extern bool AdjustTimestampForTypmod(Timestamp *time, int32 typmod,
+ struct Node *escontext);
#endif /* DATETIME_H */