Thread: Postgres Database Error Codes and Error Messages
Hi, I am new to working on Postgres database and want to explore it fully. Right now, I am interested in knowing all the predefined database error codes with error messages for situations like "No Data Found" and "Too many rows" during a query operation, "Duplicate key found" during an insert operation, "Data Type Mismatch" during a conversion operation and many more situations as identified and defined in an Oracle database. I could not find a similar list of predefined error codes anywhere in Postgres documentation. Please revert back with the appropriate source of this information as soon as possible. Thanks, Abhishek
On Tuesday 22 July 2003 06:01, Abhishek Goyal wrote: > Hi, > > I am new to working on Postgres database and want to explore it fully. > Right now, I am interested in knowing all the predefined database error > codes with error messages for situations like "No Data Found" and "Too many > rows" during a query operation, "Duplicate key found" during an insert > operation, "Data Type Mismatch" during a conversion operation and many more > situations as identified and defined in an Oracle database. > > I could not find a similar list of predefined error codes anywhere in > Postgres documentation. I don't believe there is one at present, but grep the source for elog() calls to see all of them. Be aware that the error reporting is being overhauled for 7.4 so you might want to start your study with the CVS version - see the archives of the hackers list for discussion. -- Richard Huxton Archonet Ltd
Richard Huxton <dev@archonet.com> writes: > I don't believe there is one at present, but grep the source for elog() calls > to see all of them. Be aware that the error reporting is being overhauled for > 7.4 so you might want to start your study with the CVS version - see the > archives of the hackers list for discussion. In particular see http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/elog.h for the current list of SQLSTATE error codes. This set is still changing --- if you have any comments, please make them on pgsql-hackers. regards, tom lane