Skip to content

Commit 17d6324

Browse files
author
Thomas G. Lockhart
committed
Define conversions to and from text for date, time, and timetz.
1 parent 89a99cb commit 17d6324

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $Id: catversion.h,v 1.57 2000/11/10 20:13:26 tgl Exp $
40+
* $Id: catversion.h,v 1.58 2000/11/11 19:55:33 thomas Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 200011101
56+
#define CATALOG_VERSION_NO 200011110
5757

5858
#endif

src/include/catalog/pg_proc.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_proc.h,v 1.173 2000/11/10 20:13:26 tgl Exp $
10+
* $Id: pg_proc.h,v 1.174 2000/11/11 19:55:33 thomas Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1256,6 +1256,19 @@ DESCR("horizontal?");
12561256
DATA(insert OID = 999 ( lseg_eq PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100 lseg_eq - ));
12571257
DESCR("equal");
12581258

1259+
DATA(insert OID = 748 ( date PGUID 12 f t t t 1 f 1082 "25" 100 0 0 100 text_date - ));
1260+
DESCR("convert text to date");
1261+
DATA(insert OID = 749 ( text PGUID 12 f t t t 1 f 25 "1082" 100 0 0 100 date_text - ));
1262+
DESCR("convert date to text");
1263+
DATA(insert OID = 837 ( time PGUID 12 f t t t 1 f 1083 "25" 100 0 0 100 text_time - ));
1264+
DESCR("convert text to date");
1265+
DATA(insert OID = 948 ( text PGUID 12 f t t t 1 f 25 "1083" 100 0 0 100 time_text - ));
1266+
DESCR("convert time to text");
1267+
DATA(insert OID = 938 ( timetz PGUID 12 f t t t 1 f 1266 "25" 100 0 0 100 text_timetz - ));
1268+
DESCR("convert text to date");
1269+
DATA(insert OID = 939 ( text PGUID 12 f t t t 1 f 25 "1266" 100 0 0 100 timetz_text - ));
1270+
DESCR("convert timetz to text");
1271+
12591272
/* OIDS 1000 - 1999 */
12601273

12611274
DATA(insert OID = 1026 ( timezone PGUID 12 f t f t 2 f 25 "1186 1184" 100 0 0 100 timestamp_izone - ));

src/include/utils/date.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: date.h,v 1.5 2000/06/19 03:54:48 tgl Exp $
10+
* $Id: date.h,v 1.6 2000/11/11 19:55:39 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -70,6 +70,8 @@ extern Datum date_timestamp(PG_FUNCTION_ARGS);
7070
extern Datum timestamp_date(PG_FUNCTION_ARGS);
7171
extern Datum datetime_timestamp(PG_FUNCTION_ARGS);
7272
extern Datum abstime_date(PG_FUNCTION_ARGS);
73+
extern Datum text_date(PG_FUNCTION_ARGS);
74+
extern Datum date_text(PG_FUNCTION_ARGS);
7375

7476
extern Datum time_in(PG_FUNCTION_ARGS);
7577
extern Datum time_out(PG_FUNCTION_ARGS);
@@ -85,6 +87,8 @@ extern Datum time_larger(PG_FUNCTION_ARGS);
8587
extern Datum time_smaller(PG_FUNCTION_ARGS);
8688
extern Datum timestamp_time(PG_FUNCTION_ARGS);
8789
extern Datum time_interval(PG_FUNCTION_ARGS);
90+
extern Datum text_time(PG_FUNCTION_ARGS);
91+
extern Datum time_text(PG_FUNCTION_ARGS);
8892

8993
extern Datum timetz_in(PG_FUNCTION_ARGS);
9094
extern Datum timetz_out(PG_FUNCTION_ARGS);
@@ -101,5 +105,7 @@ extern Datum timetz_larger(PG_FUNCTION_ARGS);
101105
extern Datum timetz_smaller(PG_FUNCTION_ARGS);
102106
extern Datum timestamp_timetz(PG_FUNCTION_ARGS);
103107
extern Datum datetimetz_timestamp(PG_FUNCTION_ARGS);
108+
extern Datum text_timetz(PG_FUNCTION_ARGS);
109+
extern Datum timetz_text(PG_FUNCTION_ARGS);
104110

105111
#endif /* DATE_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy