pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Mascari <mascarm@mascari.com>
To: Alex Guryanow <gav@nlr.ru>
Cc: pgsql-general@postgreSQL.org
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [GENERAL] NOTICE: (transaction aborted): queries ignored until END
Date: Sat, 18 Dec 1999 20:58:56 -0500
Message-ID: <385C3BE0.D307E8B5@mascari.com> (raw)
References: <385C1F8E.2CC771A7@nlr.ru>

Alex Guryanow wrote:
> 
> Hi,
> 
> I'm use Postgres-6.5.1 on Linux. My database contains two tables and two
> indices. I wrote simple program on C that
> - begins transaction:  BEGIN WORK
> - inserts many (10-500) rows in the first table
> - commits the transaction: COMMIT
> - begins transaction: BEGIN WORK
> - inserts many (1-50) rows in the second table
> - commits the transaction: COMMIT
> 
> During execution of this program I receive very often the following
> message:
> 
>                 NOTICE:  (transaction aborted): queries ignored until
> END
> 
> that repeated many times.
> 
> What means this message? And why this happens?
> 
> Best regards,
> Alex

That message appears when an error has occurred in a
transaction. It means that no other SQL statements will be
processed until the transaction has ended and a new one has
begun. For example:

CREATE TABLE example(key text);

=> begin;
BEGIN
=> insert into example values ('foo');
INSERT 181193 1
=> insert into example values ('bar', 20);
ERROR:  INSERT has more expressions than target columns
=> insert into example values ('bar');
NOTICE:  (transaction aborted): queries ignored until END
*ABORT STATE*
=> commit;
END
=> select * from example;
key
---
(0 rows)

It sounds as if some of your INSERT statements are not being
properly executed, often due to embedded single quotes in
text strings, lack of NULL values for missing datetime
values, or some other such syntax error. You should be able
to use PQresultStatus() and PQerrorMessage() to determine
precisely the error which is causing the transaction to
abort.

Hope that helps, 

Mike Mascari



view thread (4+ messages)  latest in thread

Message-ID: <385C3BE0.D307E8B5@mascari.com>
Permalink:  ../385C3BE0.D307E8B5@mascari.com/
Also on:    postgresql.org/message-id/385C3BE0.D307E8B5@mascari.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mascarm@mascari.com, gav@nlr.ru, pgsql-general@postgreSQL.org
  Subject: Re: [GENERAL] NOTICE: (transaction aborted): queries ignored until END
  In-Reply-To: <385C3BE0.D307E8B5@mascari.com>
  References: <385C1F8E.2CC771A7@nlr.ru> <385C3BE0.D307E8B5@mascari.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox