Jon Hanna is working to add Array support to Npgsql. He already sent a patch which I applied to my working copy and it is working very well!
Now it is possible to write code like that:
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;User id=npgsql_tests;password=npgsql_tests;");
NpgsqlCommand d = new NpgsqlCommand();
Int32 a = new Int32;
a = 4;
a = 2;
NpgsqlCommand command = new NpgsqlCommand("select :arrayParam", conn);
command.Parameters.Add(new NpgsqlParameter("arrayParam", a));
And get this logged on server:
LOG: statement: select array['4','2']::int4
Also, Npgsql is able to receive an array from server as the example above shows. Npgsql will print to console:
Which shows it received an int32 array as expected!
Excellent work, Jon!