In response to Gustavo Amarilla Santacruz <gusamasan(at)gmail(dot)com>:
> Thank you, Chris.
> Now, I need to do this in PHP:
>
> -------------------- CODE
> ---------------------------------------------------------------
>
> $errorCode = pg_result_error_field($res1, PGSQL_DIAG_SQLSTATE) ;
>
> if( $errorCode == UNIQUE_VIOLATION )
if ( $errorCode == '23505' )
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/