Skip to content

Commit bccc3e2

Browse files
author
Yasuo Ohgaki
committed
Fixed meta data retrieve when OID is larger than 2^31
1 parent 002f3ff commit bccc3e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_pgsql/pgsql_statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, long colno, zval *return
587587
add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type);
588588

589589
/* Fetch metadata from Postgres system catalogue */
590-
spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%d", S->cols[colno].pgsql_type);
590+
spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type);
591591
res = PQexec(S->H->server, q);
592592
efree(q);
593593

0 commit comments

Comments
 (0)