I'm trying to handle SQL query errors with pg_query()
function.
The code:
try{
$result = pg_query($dbconn,"SET application_name = 'testing text'");
echo $result;
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
Wonder why still I'm getting following warning message from pg_query() line.
Warning: pg_query(): Query failed: ERROR: unrecognized configuration parameter "application_name" in...
I'm try to stop that Warning. Any idea why this is not working?