Skip to content

AlchemyFDW: 'Malformed array literal' error on retrieving data from foreign Postgres array columns #7

@LanceRadioactive

Description

@LanceRadioactive

Hello! Sincere thanks for getting Multicorn working once more.
The issue I have located resides specifically in AlchemyFDW. You can reproduce it by connecting to a foreign database and attempting to create a foreign table with an array column type - _int4, for instance.

The table registers correctly; however, on attempting to query data it returns the following:

SQL Error [22P02]: ERROR: malformed array literal: "[111]"
Detail: Missing "=" after array dimensions.

I am willing to estimate that AlchemyFDW correctly retrieves the data from the foreign server, but attempts to return it in JSON/Python format (with square brackets), rather than Postgres format (using curly brackets). This is further confirmed by it successfully casting itself into other data types, such as text and jsonb.

Metadata

Metadata

Assignees

No one assigned

    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