Define conversions to and from text for date, time, and timetz.
authorThomas G. Lockhart
Sat, 11 Nov 2000 19:55:39 +0000 (19:55 +0000)
committerThomas G. Lockhart
Sat, 11 Nov 2000 19:55:39 +0000 (19:55 +0000)
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/date.h

index bf66917aa7f7aa4453aabea0caae497af50146ef..3deef21855f1b1f6cdd822b8c8ce20a8fb4c2181 100644 (file)
@@ -37,7 +37,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: catversion.h,v 1.57 2000/11/10 20:13:26 tgl Exp $
+ * $Id: catversion.h,v 1.58 2000/11/11 19:55:33 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,6 +53,6 @@
  */
 
 /*                         yyyymmddN */
-#define CATALOG_VERSION_NO 200011101
+#define CATALOG_VERSION_NO 200011110
 
 #endif
index 11f20071c7e2bc2956830b6f93f611f55aa61b8c..a45b6dcb90c06c5b2b73627b1d0f5a4b731c17cc 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_proc.h,v 1.173 2000/11/10 20:13:26 tgl Exp $
+ * $Id: pg_proc.h,v 1.174 2000/11/11 19:55:33 thomas Exp $
  *
  * NOTES
  *   The script catalog/genbki.sh reads this file and generates .bki
@@ -1256,6 +1256,19 @@ DESCR("horizontal?");
 DATA(insert OID = 999 (  lseg_eq          PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100    lseg_eq - ));
 DESCR("equal");
 
+DATA(insert OID =  748 (  date            PGUID 12 f t t t 1 f 1082 "25" 100 0 0 100 text_date - ));
+DESCR("convert text to date");
+DATA(insert OID =  749 (  text            PGUID 12 f t t t 1 f 25 "1082" 100 0 0 100 date_text - ));
+DESCR("convert date to text");
+DATA(insert OID =  837 (  time            PGUID 12 f t t t 1 f 1083 "25" 100 0 0 100 text_time - ));
+DESCR("convert text to date");
+DATA(insert OID =  948 (  text            PGUID 12 f t t t 1 f 25 "1083" 100 0 0 100 time_text - ));
+DESCR("convert time to text");
+DATA(insert OID =  938 (  timetz          PGUID 12 f t t t 1 f 1266 "25" 100 0 0 100 text_timetz - ));
+DESCR("convert text to date");
+DATA(insert OID =  939 (  text            PGUID 12 f t t t 1 f 25 "1266" 100 0 0 100 timetz_text - ));
+DESCR("convert timetz to text");
+
 /* OIDS 1000 - 1999 */
 
 DATA(insert OID = 1026 (  timezone        PGUID 12 f t f t 2 f 25 "1186 1184" 100 0 0 100  timestamp_izone - ));
index c33d27031c0b92a295b014d8ce723d4d38f28c97..19c7efff42dc6966ba5914a8fdc37470543ea1ee 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: date.h,v 1.5 2000/06/19 03:54:48 tgl Exp $
+ * $Id: date.h,v 1.6 2000/11/11 19:55:39 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -70,6 +70,8 @@ extern Datum date_timestamp(PG_FUNCTION_ARGS);
 extern Datum timestamp_date(PG_FUNCTION_ARGS);
 extern Datum datetime_timestamp(PG_FUNCTION_ARGS);
 extern Datum abstime_date(PG_FUNCTION_ARGS);
+extern Datum text_date(PG_FUNCTION_ARGS);
+extern Datum date_text(PG_FUNCTION_ARGS);
 
 extern Datum time_in(PG_FUNCTION_ARGS);
 extern Datum time_out(PG_FUNCTION_ARGS);
@@ -85,6 +87,8 @@ extern Datum time_larger(PG_FUNCTION_ARGS);
 extern Datum time_smaller(PG_FUNCTION_ARGS);
 extern Datum timestamp_time(PG_FUNCTION_ARGS);
 extern Datum time_interval(PG_FUNCTION_ARGS);
+extern Datum text_time(PG_FUNCTION_ARGS);
+extern Datum time_text(PG_FUNCTION_ARGS);
 
 extern Datum timetz_in(PG_FUNCTION_ARGS);
 extern Datum timetz_out(PG_FUNCTION_ARGS);
@@ -101,5 +105,7 @@ extern Datum timetz_larger(PG_FUNCTION_ARGS);
 extern Datum timetz_smaller(PG_FUNCTION_ARGS);
 extern Datum timestamp_timetz(PG_FUNCTION_ARGS);
 extern Datum datetimetz_timestamp(PG_FUNCTION_ARGS);
+extern Datum text_timetz(PG_FUNCTION_ARGS);
+extern Datum timetz_text(PG_FUNCTION_ARGS);
 
 #endif  /* DATE_H */