Notice: We've updated our Privacy Policy, effective November 14, 2024.

U114: Malformed array literal

Category: Application / User Errors
SQLSTATE: 22P02 (Class 22 — Data Exception: invalid_text_representation)
Urgency: low

Example Postgres Log Output:

ERROR: malformed array literal: "a, b" at character 33
DETAIL: Array value must start with \"{\" or dimension information.
STATEMENT: SELECT * FROM x WHERE id = ANY ('a, b')

Explanation:

This error usually occurs when array values get passed to Postgres, but the format / syntax of the array is not correct for Postgres.

Sometimes this can be seen when an application developer uses e.g. the JSON array syntax of [1, 2, 3] instead of the Postgres syntax of {1, 2, 3}, or when the values get passed in without the brackets (i.e. 1, 2, 3).

Recommended Action:

Fix the application code to correctly format array values.

Learn More:


Download Free eBook: The Top 6 Postgres Log Events
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →