[SQL] error codes

2008-04-17 Thread Marcin Krawczyk
Hi guys. Does anyone know the error code for '*currval of sequence * is not yet defined in this session*' error ? Is there one at all? I am aware of *others *code but I'd like to avoid using that. Thanks in advance. Regards mk

Re: [SQL] error codes

2008-04-17 Thread Craig Ringer
Marcin Krawczyk wrote: Hi guys. Does anyone know the error code for '/currval of sequence * is not yet defined in this session/' error ? Is there one at all? A quick JDBC test program shows: ERROR: currval of sequence customer_id_seq is not yet defined in this session (SQLState: 55000) which,

Re: [SQL] error codes

2008-04-17 Thread Craig Ringer
Craig Ringer wrote: Marcin Krawczyk wrote: Hi guys. Does anyone know the error code for '/currval of sequence * is not yet defined in this session/' error ? Is there one at all? A quick JDBC test program shows: ERROR: currval of sequence customer_id_seq is not yet defined in this session

[SQL] Error codes as numbers or in other languages etc.

2001-10-23 Thread Aasmund Midttun Godal
I have seen several people asking about getting error numbers or similar things out of postgres. The way I have done this is as follows: CREATE TABLE errors ( errorstring TEXT PRIMARY KEY, message TEXT ); INSERT INTO errors VALUES ('^FATAL 1: Database ([^\]+) does not exist in