Hi,
In my source code, I have:
res = PQexec(conn,"select * from resource");
if(PQresultStatus(res) != PGRES_COMMAND_OK){
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"PQexec failed:%s\n",PQerrorMessage(conn));
PQclear(res);
return NULL;
}
PQclear(res);
When it is executed, I am getting PGexec failed error , but the return value of PQerrorMessage(conn) is empty.
Does anyone know why?
Thanks,
JB