The below mentioned pg_database does not appear in $1.
In the postgresql.log I get "select datname from $1".
Do you have a suggestion of how to solve this?
I get double declarations when using both
char *paramValues[1]
char *paramValues[1]
//char *value1 = "pg_database";
//char **paramValues = &value1; /* closer match to the documentation's syntax */
char *paramValues[1] = {"pg_database"}; /* same as above, different syntax */
//
//char *paramValues[1]; /* this looks to be missing */
//paramValues[0]={"pg_database"}; /* what you had */
res = PQexecParams(conn,
"select datname from $1",
1, /* there is only 1 entry in paramValues array */
NULL,
paramValues, /* address of parameter value array */
NULL, /* don't need param lengths since text */
NULL, /* defaul to all text params */
1); /* return all values as binary */
Thanks.
/Poul