summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJay Smith <jay@php.net>2003-04-01 23:56:16 +0000
committerJay Smith <jay@php.net>2003-04-01 23:56:16 +0000
commitdcf0c709501a0b04e231f7e87d53d70d5ee58dc8 (patch)
treeade465e44e5c7e75900d1b338c782dec1c3e711a /ext
parentccfcd0d4119493cbad3e92b267337d6e0e1f8a1d (diff)
downloadphp-git-dcf0c709501a0b04e231f7e87d53d70d5ee58dc8.tar.gz
Fix 'timestamp without timezone', too.
Diffstat (limited to 'ext')
-rw-r--r--ext/pgsql/pgsql.c3
-rw-r--r--ext/pgsql/php_pgsql.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 57b9bd59cd..f6ca59d75f 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3205,6 +3205,8 @@ static php_pgsql_data_type php_pgsql_get_data_type(const char *type_name, size_t
return PG_TIME;
if (!strcmp(type_name, "time with time zone") || !strcmp(type_name, "timetz"))
return PG_TIME_WITH_TIMEZONE;
+ if (!strcmp(type_name, "timestamp without time zone") || !strcmp(type_name, "timestamp"))
+ return PG_TIMESTAMP;
if (!strcmp(type_name, "timestamp with time zone") || !strcmp(type_name, "timestamptz"))
return PG_TIMESTAMP_WITH_TIMEZONE;
if (!strcmp(type_name, "interval"))
@@ -3657,6 +3659,7 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
break;
case PG_TIME_WITH_TIMEZONE:
+ case PG_TIMESTAMP:
case PG_TIMESTAMP_WITH_TIMEZONE:
switch(Z_TYPE_PP(val)) {
case IS_STRING:
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h
index fbc4b90164..429cefe53d 100644
--- a/ext/pgsql/php_pgsql.h
+++ b/ext/pgsql/php_pgsql.h
@@ -196,6 +196,7 @@ typedef enum _php_pgsql_data_type {
PG_DATE,
PG_TIME,
PG_TIME_WITH_TIMEZONE,
+ PG_TIMESTAMP,
PG_TIMESTAMP_WITH_TIMEZONE,
PG_INTERVAL,
/* binary */