Skip to content

psqlpy.exceptions.RustToPyValueMappingError: array contains too many dimensions #79

@nicolaspi

Description

@nicolaspi

psqlpy-0.7.6
The following code raises: psqlpy.exceptions.RustToPyValueMappingError: Can't convert value from driver to python type: Cannot convert PostgreSQL type _int4 into Python type, err: array contains too many dimensions
(the query executes properly in PSQL)

import asyncio
from psqlpy import ConnectionPool


def main():
    db_pool = ConnectionPool()
    result = asyncio.run(db_pool.execute(
        "SELECT array_agg(arr) FROM (SELECT array(SELECT generate_series(0, 10, 1)) as arr FROM (SELECT generate_series(0, 10, 1) as value));",
    ))
    result.result()
    db_pool.close()

main()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions