#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <pgtypes_date.h>
#include <pgtypes_timestamp.h>
Go to the source code of this file.
|
#define | ECPGdebug(X, Y) ECPGdebug((X)+100,(Y)) |
|
◆ ECPGdebug
#define ECPGdebug |
( |
|
X, |
|
|
|
Y |
|
) |
| ECPGdebug((X)+100,(Y)) |
◆ main()
Definition at line 77 of file pgtypeslib-dt_test2.c.
86 #line 62 "dt_test2.pgc"
89 #line 63 "dt_test2.pgc"
92 #line 64 "dt_test2.pgc"
95 #line 65 "dt_test2.pgc"
98 #line 66 "dt_test2.pgc"
101 #line 67 "dt_test2.pgc"
127 if (date1 == INT_MIN) {
131 printf(
"Date[%d]: %s (%c - %c)\n",
140 int length = strlen(
dates[
i])
149 i,
j, errno ?
"-" :
text);
163 printf(
"endptr set to %s\n", endptr);
166 printf(
"Error parsing interval %d\n",
i);
void PGTYPESchar_free(char *ptr)
date PGTYPESdate_from_timestamp(timestamp dt)
date PGTYPESdate_from_asc(char *str, char **endptr)
void PGTYPESdate_free(date *d)
char * PGTYPESdate_to_asc(date dDate)
date * PGTYPESdate_new(void)
void PGTYPESinterval_free(interval *intvl)
char * PGTYPESinterval_to_asc(interval *span)
int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest)
interval * PGTYPESinterval_new(void)
interval * PGTYPESinterval_from_asc(char *str, char **endptr)
timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr)
int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout)
char * PGTYPEStimestamp_to_asc(timestamp tstamp)
References dates, ECPGdebug, free, i, intervals, j, malloc, PGTYPESchar_free(), PGTYPESdate_free(), PGTYPESdate_from_asc(), PGTYPESdate_from_timestamp(), PGTYPESdate_new(), PGTYPESdate_to_asc(), PGTYPESinterval_copy(), PGTYPESinterval_free(), PGTYPESinterval_from_asc(), PGTYPESinterval_new(), PGTYPESinterval_to_asc(), PGTYPEStimestamp_add_interval(), PGTYPEStimestamp_from_asc(), PGTYPEStimestamp_to_asc(), printf, sprintf, and times.
◆ dates
Initial value:= { "19990108foobar",
"19990108 foobar",
"1999-01-08 foobar",
"January 8, 1999",
"1999-01-08",
"1/8/1999",
"1/18/1999",
"01/02/03",
"1999-Jan-08",
"Jan-08-1999",
"08-Jan-1999",
"99-Jan-08",
"08-Jan-99",
"08-Jan-06",
"Jan-08-99",
"19990108",
"990108",
"1999.008",
"J2451187",
"January 8, 99 BC",
"........................Xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
".........................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
NULL }
Definition at line 28 of file pgtypeslib-dt_test2.c.
Referenced by main().
◆ intervals
Initial value:= { "1 minute",
"1 12:59:10",
"2 day 12 hour 59 minute 10 second",
"1 days 12 hrs 59 mins 10 secs",
"1 days 1 hours 1 minutes 1 seconds",
"1 year 59 mins",
"1 year 59 mins foobar",
NULL }
Definition at line 67 of file pgtypeslib-dt_test2.c.
Referenced by btree_xlog_dedup(), and main().
◆ times
Initial value:= { "0:04",
"1:59 PDT",
"13:24:40 -8:00",
"13:24:40.495+3",
"13:24:40.123456123+3",
NULL }
Definition at line 60 of file pgtypeslib-dt_test2.c.
Referenced by main().