Skip to content

Type "int[]" does not exist when using dynamic values for casting #3365

Closed
@aemonm

Description

@aemonm

I have the following statement to as part of a larger query:
sql`AND my_table.some_column = ANY(${values}::${pgSql(type)}[])`

When type is text, it works as expected. When type is int I get the following error:
Error [PostgresError]: type "int[]" does not exist

Shouldn't I be able to use dynamic type casting for both text and int ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions