Re: [GENERAL] NOTICE: (transaction aborted): queries ignored until END

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Alex Guryanow <gav(at)nlr(dot)ru>
Cc: pgsql-general(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [GENERAL] NOTICE: (transaction aborted): queries ignored until END
Date: 1999-12-19 01:58:56
Message-ID: 385C3BE0.D307E8B5@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message neko 1999-12-19 09:47:44 Re: [SQL] NOTICE: (transaction aborted): queries ignored until END
Previous Message Charles Tassell 1999-12-19 00:05:44 Re: [GENERAL] Postgres install problem

Browse pgsql-sql by date

  From Date Subject
Next Message neko 1999-12-19 09:47:44 Re: [SQL] NOTICE: (transaction aborted): queries ignored until END
Previous Message Alex Guryanow 1999-12-18 23:58:06 NOTICE: (transaction aborted): queries ignored until END