-
Notifications
You must be signed in to change notification settings - Fork 874
Closed
Description
We're looking at upgrading from a custom built 2.0.11 version of Npgsql to the latest and greatest and we ran in to this issue:
var comm = conn.CreateCommand();
comm.CommandText = "SELECT :something";
comm.Parameters.AddWithValue("something", new[] { 1, 2, 3 }.Select(x => x)); //Parameter is an IEnumerable<int>
var res = comm.ExecuteScalar();Previously this would work, now it generates invalid SQL for the parameter.
Bad (IEnumerable):
SELECT (('[1,2,3]')::int4[])
Good (Using an Array):
SELECT (('{1,2,3}')::int4[])I might take a quick look through to see if I can fix this, no promises however :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels