summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 323fed4d18..5507b2a29a 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,9 @@ PHP NEWS
. Allowed PDO_OCI to compile with Oracle Database 12c client libraries.
(Chris Jones)
+- PDO_pgsql:
+ . Fixed meta data retrieve when OID is larger than 2^31. (Yasuo)
+
- Phar:
. Fixed Bug #65142 (Missing phar man page). (Remi)
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);