diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2013-07-11 12:23:11 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2013-07-13 06:06:23 +0900 |
commit | 0ddb3d97de1f4c7e2a2a81182aa581ac76f2a300 (patch) | |
tree | 5a213af1cc7699dc4770b42469c9dd476b30eab3 /ext/pdo_pgsql | |
parent | d2a83efe5b5a49181afe75346a9d33286b8d2ef8 (diff) | |
download | php-git-0ddb3d97de1f4c7e2a2a81182aa581ac76f2a300.tar.gz |
Fixed meta data retrieve when OID is larger than 2^31
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r-- | ext/pdo_pgsql/pgsql_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index d58eebf8f4..3ef89196de 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -587,7 +587,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, long colno, zval *return add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type); /* Fetch metadata from Postgres system catalogue */ - spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%d", S->cols[colno].pgsql_type); + spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type); res = PQexec(S->H->server, q); efree(q); |