Skip to content

Citext comparison not working properly in version 3.2.5 #1894

@nescada

Description

@nescada

After upgrading to the version npgsql 3.2.5 (from the 2.2.7 version) queries against citext columns started behaving as a normal text, this means that instead of ignoring the case as it was in the previous version it is checking if the value matches exactly the provided parameter value.

Apparently this behavior started in the version 3.0 remains as described in the 3.2.7 version.

Code Sample

        NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;User Id=postgres;" +
                                "Password=postgres;Database=test;");
        conn.Open();
        
        NpgsqlCommand cmd = new NpgsqlCommand("Select * from test_table where citext_col=@val", conn);
      
        cmd.Parameters.AddWithValue("@val", "Value");

        NpgsqlDataReader dr = cmd.ExecuteReader();

        while (dr.Read())
            Console.Write("{0}\n", dr[0]);

Further technical details

Npgsql version: 3.+
PostgreSQL version: 9.5
Operating system: Windows Seven

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