ext/psql: pg_meta_data, extended mode, fix typo for pseudo typtype.

Closes GH-10865.
This commit is contained in:
David CARLIER 2023-03-16 19:28:07 +00:00 committed by David Carlier
parent 53763e14b7
commit 5adeed3051
3 changed files with 7 additions and 3 deletions

4
NEWS
View File

@ -33,6 +33,10 @@ PHP NEWS
. Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit().
(nielsdos)
- PGSQL:
. Fixed typo in the array returned from pg_meta_data (extended mode).
(David Carlier)
- SPL:
. Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman)

View File

@ -4343,7 +4343,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string
/* pg_type.typtype */
add_assoc_bool_ex(&elem, "is base", sizeof("is base") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "b"));
add_assoc_bool_ex(&elem, "is composite", sizeof("is composite") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "c"));
add_assoc_bool_ex(&elem, "is pesudo", sizeof("is pesudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p"));
add_assoc_bool_ex(&elem, "is pseudo", sizeof("is pseudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p"));
/* pg_description.description */
add_assoc_string_ex(&elem, "description", sizeof("description") - 1, PQgetvalue(pg_result, i, 8));
}

View File

@ -122,7 +122,7 @@ array(2) {
bool(true)
["is composite"]=>
bool(false)
["is pesudo"]=>
["is pseudo"]=>
bool(false)
["description"]=>
string(0) ""
@ -147,7 +147,7 @@ array(2) {
bool(true)
["is composite"]=>
bool(false)
["is pesudo"]=>
["is pseudo"]=>
bool(false)
["description"]=>
string(0) ""