]> granicus.if.org Git - php/commitdiff
Fixed Bug #70092 pg_field_type() is too slow
authorYasuo Ohgaki <yohgaki@php.net>
Sat, 25 Jul 2015 20:29:06 +0000 (05:29 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Sat, 25 Jul 2015 20:29:27 +0000 (05:29 +0900)
ext/pgsql/pgsql.c

index 1172682bbc256a951bf6563af59eb3ca4cb4165b..888ae76cced520d063b3da0ee35acf32d0098a57 100644 (file)
@@ -2368,7 +2368,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
                                continue;
                        }
 
-                       ZSTR_LEN(str.s) = 0;
+                       smart_str_free(&str);
                        smart_str_appends(&str, "pgsql_oid_");
                        smart_str_appends(&str, tmp_oid);
                        smart_str_0(&str);