]> granicus.if.org Git - php/commitdiff
@- Fixed bug #23009 (pg_select with timestamp). (Marcus, Jay)
authorJay Smith <jay@php.net>
Wed, 2 Apr 2003 00:00:09 +0000 (00:00 +0000)
committerJay Smith <jay@php.net>
Wed, 2 Apr 2003 00:00:09 +0000 (00:00 +0000)
MFH

ext/pgsql/pgsql.c
ext/pgsql/php_pgsql.h

index 5e35d41869f6f005d019832bcfd386bb262e60d4..ed54b149f1c91edc2832a3f475ab6e1fb098ef8f 100644 (file)
@@ -3203,8 +3203,10 @@ static php_pgsql_data_type php_pgsql_get_data_type(const char *type_name, size_t
                return PG_DATE;
        if (!strcmp(type_name, "time"))
                return PG_TIME;
-       if (!strcmp(type_name, "timestamp") || !strcmp(type_name, "time with time zone"))
+       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:
index fbc4b901645653f21e0d438734114de8090f938b..429cefe53d399ec583df99390d8095446ddd5597 100644 (file)
@@ -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 */