You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP: 8.3.0
ext-pgsql: 8.3.0
amphp/postgres: v2.1.0
postgresql version 14.6 (also reproduced on 17.0)
e.g. try to execute this SQL
SELECT quote_ident(ic.relname) AS relname,
i.indisunique,
i.indisprimary,
i.indkey,
i.indrelid,
pg_get_expr(indpred, indrelid) AS "where"
FROM pg_index i
JOIN pg_class AS tc ON tc.oid = i.indrelid
JOIN pg_namespace tn ON tn.oid = tc.relnamespace
JOIN pg_class AS ic ON ic.oid = i.indexrelid
WHERE ic.oid IN (
SELECT indexrelid
FROM pg_index i, pg_class c, pg_namespace n WHERE c.oid = i.indrelid AND c.relnamespace = n.oid AND n.nspname = ANY(current_schemas(false)) AND c.relname = 'doctrine_migration_versions' AND n.nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast'))
like this
and an exception is thrown
"Parse error while splitting array: Missing opening bracket" in /app/vendor/amphp/postgres/src/Internal/ArrayParser.php line 64
when parsing i.indkey (i.indkey has type int2vector, in this case value is returned to php as string "1")
P.S. for a field with type int2vector function pg_field_type_oid() returns OID 22 and pg_field_type( ) returns "int2vector"
I suppose the problem is here \Amp\Postgres\Internal\PgSqlResultIterator::cast
I guess int2vector should be treated/parse as a regular string to fix this?
The text was updated successfully, but these errors were encountered:
I did see this issue and plan to have a look at this weekend. I intend to fix this issue and also review the casting in ext-pq to have parity between the two extensions used by this library.
PHP: 8.3.0
ext-pgsql: 8.3.0
amphp/postgres: v2.1.0
postgresql version 14.6 (also reproduced on 17.0)
e.g. try to execute this SQL
like this
and an exception is thrown
"Parse error while splitting array: Missing opening bracket" in /app/vendor/amphp/postgres/src/Internal/ArrayParser.php line 64
when parsing i.indkey (i.indkey has type int2vector, in this case value is returned to php as string "1")
P.S. for a field with type int2vector function pg_field_type_oid() returns OID 22 and pg_field_type( ) returns "int2vector"
I suppose the problem is here \Amp\Postgres\Internal\PgSqlResultIterator::cast
I guess int2vector should be treated/parse as a regular string to fix this?
The text was updated successfully, but these errors were encountered: