"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> The code in question looks like this:
> static const char *prepareuserquery =
> "PREPARE UserQuery (text,text) AS SELECT UserID FROM Users WHERE Name=$1
> AND Password=$2";
> if( ( result = PQexecPrepared( sqlhandle, "UserQuery", 2, (const char*
> const *)parameters, NULL, param_format, 1 ) ) == NULL ) {
You've got an identifier-case problem. The statement name argument to
PQexecPrepared is taken literally (as if double-quoted), but the name
appearing in the PREPARE command will have been effectively folded to
lower case.
regards, tom lane