1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Add make_date() and make_time() functions.

Pavel Stehule, reviewed by Jeevan Chalke and Atri Sharma
This commit is contained in:
Tom Lane
2013-11-17 15:06:50 -05:00
parent 69c8fbac20
commit f901bb50e3
9 changed files with 162 additions and 4 deletions

View File

@@ -44,8 +44,6 @@ static int DecodeTimezone(char *str, int *tzp);
static const datetkn *datebsearch(const char *key, const datetkn *base, int nel);
static int DecodeDate(char *str, int fmask, int *tmask, bool *is2digits,
struct pg_tm * tm);
static int ValidateDate(int fmask, bool isjulian, bool is2digits, bool bc,
struct pg_tm * tm);
static void TrimTrailingZeros(char *str);
static void AppendSeconds(char *cp, int sec, fsec_t fsec,
int precision, bool fillzeros);
@@ -2270,7 +2268,7 @@ DecodeDate(char *str, int fmask, int *tmask, bool *is2digits,
* Check valid year/month/day values, handle BC and DOY cases
* Return 0 if okay, a DTERR code if not.
*/
static int
int
ValidateDate(int fmask, bool isjulian, bool is2digits, bool bc,
struct pg_tm * tm)
{