aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/timestamp.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-09-06 03:22:42 +0000
committerBruce Momjian <bruce@momjian.us>2001-09-06 03:22:42 +0000
commit2a34134b6c5a46d8f905a82af51c55a7ec91ecac (patch)
treea791f893a03000fb533ea1efecd313c7478de2c1 /src/backend/utils/adt/timestamp.c
parent74dde13e2c5bab897ec2cd0b50e92cfae83f8109 (diff)
downloadpostgresql-2a34134b6c5a46d8f905a82af51c55a7ec91ecac.tar.gz
postgresql-2a34134b6c5a46d8f905a82af51c55a7ec91ecac.zip
- new to_char(interval, text)
- new millisecond (ms) and microsecond (us) support - more robus parsing from string - used is separator checking for non-exact formats like to_date('2001-9-1', 'YYYY-MM-DD') - SGML docs are included Karel Zak
Diffstat (limited to 'src/backend/utils/adt/timestamp.c')
-rw-r--r--src/backend/utils/adt/timestamp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 68099de8678..824faae152b 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.49 2001/05/03 22:53:07 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.50 2001/09/06 03:22:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,9 +33,6 @@ static double time2t(const int hour, const int min, const double sec);
static int EncodeSpecialTimestamp(Timestamp dt, char *str);
static Timestamp dt2local(Timestamp dt, int timezone);
static void dt2time(Timestamp dt, int *hour, int *min, double *sec);
-static int interval2tm(Interval span, struct tm * tm, float8 *fsec);
-static int tm2interval(struct tm * tm, double fsec, Interval *span);
-
/*****************************************************************************
* USER I/O ROUTINES *
@@ -412,7 +409,7 @@ tm2timestamp(struct tm * tm, double fsec, int *tzp, Timestamp *result)
/* interval2tm()
* Convert a interval data type to a tm structure.
*/
-static int
+int
interval2tm(Interval span, struct tm * tm, float8 *fsec)
{
double time;
@@ -444,7 +441,7 @@ interval2tm(Interval span, struct tm * tm, float8 *fsec)
return 0;
} /* interval2tm() */
-static int
+int
tm2interval(struct tm * tm, double fsec, Interval *span)
{
span->month = ((tm->tm_year * 12) + tm->tm_mon);