summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorJay Smith <jay@php.net>2003-04-01 23:26:10 +0000
committerJay Smith <jay@php.net>2003-04-01 23:26:10 +0000
commitcff236c4a6cb1fe560a3c635a9d504e96c228764 (patch)
treebd5c24c6ab8172899f80409a9c4380fe7ca6e440 /ext/pgsql/pgsql.c
parent4b343a05628ed0150c2bdd239d59a689e8697e0b (diff)
downloadphp-git-cff236c4a6cb1fe560a3c635a9d504e96c228764.tar.gz
Fixed bug #23009 (pg_select with timestamp)
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index cc3e7ebed6..fb12c82eca 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3205,7 +3205,7 @@ static php_pgsql_data_type php_pgsql_get_data_type(const char *type_name, size_t
return PG_TIME;
if (!strcmp(type_name, "timestamp") || !strcmp(type_name, "time with time zone"))
return PG_TIME_WITH_TIMEZONE;
- if (!strcmp(type_name, "timestamp with time zone"))
+ if (!strcmp(type_name, "timestamp with time zone") || !strcmp(type_name, "timestamptz"))
return PG_TIMESTAMP_WITH_TIMEZONE;
if (!strcmp(type_name, "interval"))
return PG_INTERVAL;
@@ -3665,7 +3665,7 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
}
else {
/* FIXME: better regex must be used */
- if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) {
+ if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[a-zA-Z]{1,5})){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) {
err = 1;
}
else {