title: postgresql equivalent of mysql errno
body: <p>I am converting a PHP script from MySQL to PostgreSQL. </p>
  
  <p>I thought the equivalent for  <code>mysqli_errno</code> is <code>pg_last_error</code>, is it okay? If not, could you please suggest an alternative?</p>