Unfortunately, we are unable to perform such a call in LINQ to PostgreSQL.
Please note that this code cannot be called using teh following ADO.NET sample code as well:
Code: Select all
PgSqlConnection conn = new PgSqlConnection("uid=*;pwd=*;host=andreyr;database=testdb");
conn.Open();
PgSqlCommand cmd = new PgSqlCommand("select pg_column_size(:p0);", conn);
cmd.Parameters.Add("p0", "test");
using (PgSqlDataReader rdr = cmd.ExecuteReader()) {
while (rdr.Read()) {
int i = rdr.GetInt32(0);
}
The problem is associated with the fact that the type of parameter in this case is "any" in PostgreSQL, and cannot be determined correctly.