From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Assad Jarrahian <jarraa(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: problems with currval and rollback |
Date: | 2005-12-23 01:32:48 |
Message-ID: | 200512230132.jBN1Wmp26612@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Assad Jarrahian wrote:
> I am not sure what do you mean (In terms of what more do you need).
> For the java code:
> The insert works. (cause i see it in the db).
> the currval does not work anymore. (see error message below).
> And for some reason, it still inserts into the db, regardless of the
> rollback (and setAutocommit(false))
>
> For the SQL code itself
> [here is the query being performed]
> INSERT INTO lm values (DEFAULT, DEFAULT, DEFAULT, 'jarraa', DEFAULT,
> ROW(point(0,0),0), '', 'jarraa','jarraa', '', 'blah', DEFAULT);
> SELECT currval('lm_id_seq');
>
> I perform this back to back in the db, and the currval works fine.
>
> What gives? It used to work in the java code, but now it doesn't!
> Also, please comment on your thoughts about the rollback.
> Much thanks for your help.
I recommend you ask jdbc questions on the jdbc email list.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-12-23 06:05:10 | Re: query for a time interval |
Previous Message | Assad Jarrahian | 2005-12-23 01:28:27 | Re: problems with currval and rollback |