summaryrefslogtreecommitdiff
path: root/src/include/utils/formatting.h
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>2000-02-16 17:26:26 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>2000-02-16 17:26:26 +0000
commit41f1f5b76ad8e177a2b19116cbf41384f93f3851 (patch)
tree2165e6c833bc96f32e2d2b45c1d40b71e9c82ab7 /src/include/utils/formatting.h
parentc97672b08325d722cf5807ffede9fd31ee070f72 (diff)
downloadpostgresql-41f1f5b76ad8e177a2b19116cbf41384f93f3851.tar.gz
Implement "date/time grand unification".
Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
Diffstat (limited to 'src/include/utils/formatting.h')
-rw-r--r--src/include/utils/formatting.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h
index 51c649fd9d..39259afff2 100644
--- a/src/include/utils/formatting.h
+++ b/src/include/utils/formatting.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------
* formatting.h
*
- * $Id: formatting.h,v 1.2 2000/02/08 15:56:57 momjian Exp $
+ * $Id: formatting.h,v 1.3 2000/02/16 17:26:26 thomas Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -18,16 +18,14 @@
#ifndef _FORMATTING_H_
#define _FORMATTING_H_
-extern text *datetime_to_char(DateTime *dt, text *fmt);
-extern text *timestamp_to_char(time_t dt, text *fmt);
-extern DateTime *to_datetime(text *date_str, text *fmt);
-extern time_t to_timestamp(text *date_str, text *fmt);
-extern DateADT to_date(text *date_str, text *fmt);
-extern Numeric numeric_to_number(text *value, text *fmt);
-extern text *numeric_to_char(Numeric value, text *fmt);
-extern text *int4_to_char(int32 value, text *fmt);
-extern text *int8_to_char(int64 *value, text *fmt);
-extern text *float4_to_char(float32 value, text *fmt);
-extern text *float8_to_char(float64 value, text *fmt);
+extern text *timestamp_to_char(Timestamp *dt, text *fmt);
+extern Timestamp *to_timestamp(text *date_str, text *fmt);
+extern DateADT to_date(text *date_str, text *fmt);
+extern Numeric numeric_to_number(text *value, text *fmt);
+extern text *numeric_to_char(Numeric value, text *fmt);
+extern text *int4_to_char(int32 value, text *fmt);
+extern text *int8_to_char(int64 *value, text *fmt);
+extern text *float4_to_char(float32 value, text *fmt);
+extern text *float8_to_char(float64 value, text *fmt);
#endif