Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: error codes
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3416 of 3661
Post > Topic >>

Re: error codes

by craig@[EMAIL PROTECTED] (Craig Ringer) Apr 17, 2008 at 06:51 PM

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 (SQLState: 55000)

I've just realised I've been doing this a stupid way without thinking
about it. Unsurprisingly it turns out that no Java/JDBC snippets are
required. The much, much easier way to find the error code:

$ psql

.... blah blah blah ...

test=# \set VERBOSITY verbose
test=# select currval('test_seq');
ERROR:  55000: currval of sequence "test_seq" is not yet defined in this
session
LOCATION:  currval_oid, sequence.c:644

In retrospect it seems kind of obvious - "surely psql must have way to
show this information, maybe I should look at the manual....".

--
Craig Ringer

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 3 Posts in Topic:
error codes
jankes.mk@[EMAIL PROTECTE  2008-04-17 10:23:30 
Re: error codes
craig@[EMAIL PROTECTED]   2008-04-17 18:43:16 
Re: error codes
craig@[EMAIL PROTECTED]   2008-04-17 18:51:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:43:46 CDT 2008.