This function is useful it may not return a full non fatal error but you want to see if the query completes anyway.
example
<?PHP
/connect to pg database
/ create PGSQL
$PGSTAT = pg_result_status($PGSQL);/defaults to long
/And run it through a check for example
if(($PGSTAT == 1) || ($PGSTAT == 2)){
/ for query results;
}else if(($PGSTAT == 3) || ($PGSTAT == 4)){
/ for copy results;
}
if(($PGSTAT != 0) && ($PGSTAT != 5) && ($PGSTAT != 6) && ($PGSTAT != 7)){
/ your code;
}else{
/ $ERRORS codes;
}
/ This is worked the best for me so far I tried using
/ The command tag and I seem to still get an numeric result
/example
/$PGSTAT = pg_result_status($PGSQL, PGSQL_COMMAND_OK);
/ got something like tuples ok so I recommend just use default long
?>
or use what ever condition check you feel fit