mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Add 'day' field to INTERVAL so 1 day interval can be distinguished from
24 hours. This is very helpful for daylight savings time: select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours'; ?column? ---------------------- 2005-05-04 01:00:00-04 select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day'; ?column? ---------------------- 2005-05-04 01:00:00-04 Michael Glaesemann
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
* formatting.c
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.90 2005/06/24 01:10:11 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.91 2005/07/20 16:42:30 momjian Exp $
|
||||
*
|
||||
*
|
||||
* Portions Copyright (c) 1999-2005, PostgreSQL Global Development Group
|
||||
@ -899,7 +899,7 @@ static char *str_tolower(char *buff);
|
||||
/* static int is_acdc(char *str, int *len); */
|
||||
static int seq_search(char *name, char **array, int type, int max, int *len);
|
||||
static void do_to_timestamp(text *date_txt, text *fmt,
|
||||
struct pg_tm * tm, fsec_t *fsec);
|
||||
struct pg_tm *tm, fsec_t *fsec);
|
||||
static char *fill_str(char *str, int c, int max);
|
||||
static FormatNode *NUM_cache(int len, NUMDesc *Num, char *pars_str, bool *shouldFree);
|
||||
static char *int_to_roman(int number);
|
||||
@ -3028,7 +3028,7 @@ to_date(PG_FUNCTION_ARGS)
|
||||
*/
|
||||
static void
|
||||
do_to_timestamp(text *date_txt, text *fmt,
|
||||
struct pg_tm * tm, fsec_t *fsec)
|
||||
struct pg_tm *tm, fsec_t *fsec)
|
||||
{
|
||||
FormatNode *format;
|
||||
TmFromChar tmfc;
|
||||
|
Reference in New Issue
Block a user