"Andy McCurdy" <andy.mccurdy@emergent.net> writes:
> result = PQprepare(conn, "MyQuery", "select * from pg_stat_activity", 0,
> NULL);
I believe the above will result in preparing a statement named "MyQuery",
ie, no case-folding happens on the second argument of PQprepare, because
it never goes through the SQL parser.
> /*
> THE FOLLOW PQEXEC() FAILS. Error message says: ERROR: prepared statement
> "myquery" does not exist"
> */
> result = PQexec(conn, "DEALLOCATE MyQuery");
I think this would work:
result = PQexec(conn, "DEALLOCATE \"MyQuery\"");
regards, tom lane