I work with PHP5 and PostgreSQL7.4 Currently (for testing purpose) my script catches the db errors and echoes them to a client without any manipulation. But I need to examine these errors and echo messages according the error type/class. >From the PostgreSQL doc: ...All messages emitted by the PostgreSQL server are assigned five-character error codes that follow the SQL standard's conventions for "SQLSTATE" codes. Applications that need to know which error condition has occurred should usually test the error code, rather than looking at the textual error message. The error codes are less likely to change across PostgreSQL releases, and also are not subject to change due to localization of error messages... Anybody know how to get the PostgreSQL error code/class in PHP? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php