WriteEnumeration would use Square braces instead of Curly braces, in comparison WriteArray always uses Curly braces.
I've changed WriteEnumeration to always use Curly to match.
Not 100% sure if this is the right fix, but works for this case. I've added a test.
Add a test for IEnumerable<int> as a parameter. refs #222
Always use Curly braces here (matches the WriteArray method), fixes #222
Thanks for your patch, @danzel !
@glenebob , can you please check if it is ok? It seems brackets are being used when not using prepared statements which is giving errors. Maybe those brackets were there to be used with array constructor syntax? http://www.postgresql.org/docs/9.1/static/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS
After checking the documentation, http://www.postgresql.org/docs/8.4/static/arrays.html the bracket notation is only used when the string ARRAY is written before the array. i.e.: (from postgresql documentation)
INSERT INTO sal_emp
ARRAY[10000, 10000, 10000, 10000],
ARRAY[['meeting', 'lunch'], ['training', 'presentation']]);
I think this notation format was left there by mistake because we used to use this notation but we don't use it anymore.
I conclude then that the fix proposed is correct. Merging now...
While doing the tests, I noticed another bug in Npgsql with prepared statements and IEnumerable