Skip to content

Sql with in clause fails with PostgreSQL #1324

@sandeep-eroad

Description

@sandeep-eroad

Following fails

var result = con.Query<Drivers>("select first_name, last_name from drivers where first_name in @Ids", new { Ids = new string[] {"Sandeep", "Sam"}});

with exception
Unhandled Exception: Npgsql.PostgresException: 42601: syntax error at or near "$1" at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext() in C:\projects\npgsql\src\Npgsql\NpgsqlConnector.cs:line 1032

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