Forum OpenACS Development: Re: Nextval and sessions

Collapse
4: Re: Nextval and sessions (response to 1)
Posted by Malte Sussdorff on
To shed some more light into this, here is an excerpt from the error log, note that this is all from the same user. Furthermore, the first error is catched and we try afterwards, if the first insert failed, to increase the sequence number and make the insert again. Interestingly the retrieval of the sequence fails...:

[07/Jul/2006:13:14:37][26514.1126636464][-conn:wieners::24] Error: Ns_PgExec: result status: 7 message: ERROR: duplicate key violates unique constraint "acs_objects_pk"
CONTEXT: SQL statement "insert into acs_objects (object_id, object_type, title, package_id, context_id, creation_date, creation_user, creation_ip, security_inherit_p) values ( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 )"
PL/pgSQL function "acs_object__new" line 40 at SQL statement
PL/pgSQL function "content_revision__new" line 30 at assignment
PL/pgSQL function "content_revision__new" line 15 at return

[07/Jul/2006:13:14:37][26514.1126636464][-conn:wieners::24] Error: Ns_PgExec: result status: 7 message: ERROR: current transaction is aborted, commands ignored until end of transaction block

[07/Jul/2006:13:14:39][26514.1126636464][-conn:wieners::24] Error: POST http://lektor.wienersundwieners.de/invoices/offer-ae?
referred by "http://lektor.wienersundwieners.de/invoices/offer-ae";
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: current transaction is aborted, commands ignored until end of transaction block

SQL: select nextval('t_acs_object_id_seq') from dual
while executing
"ns_pg_bind 0or1row nsdb0 {select nextval('t_acs_object_id_seq') from dual}"