transaction abortion

Started by Kancha .about 24 years ago5 messagesgeneral
Jump to latest
#1Kancha .
kancha2np@yahoo.com

I'm in a situtation where transaction is aborted. I'm
a newbie so please help.

I start transaction with begin then do some queries
like update and insert. So far so good, but when i run
select query within the transaction the whole
transaction is aborted.

what should i do ??

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Kancha . (#1)
Re: [SQL] transaction abortion

Hi Kancha,

Chances are you have a syntax error in the select statement. Can you please
port the entire set of queries you are trying to run and we'll look at them.

Chris

Show quoted text

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Kancha .
Sent: Tuesday, 26 February 2002 2:35 PM
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: [SQL] transaction abortion

I'm in a situtation where transaction is aborted. I'm
a newbie so please help.

I start transaction with begin then do some queries
like update and insert. So far so good, but when i run
select query within the transaction the whole
transaction is aborted.

what should i do ??

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#3Kancha .
kancha2np@yahoo.com
In reply to: Christopher Kings-Lynne (#2)
Re: [SQL] transaction abortion

here is the exact query :

begin;

update cst_package set status='f' where cid='28' and
status='t';

insert into cst_package (startdate, enddate, status,
pkgid, cid) values ('2002-02-14', '2003-02-14', 't',
'112', '28');

select acb_transaction.amount as amount,
acb_transaction.iscredit as iscredit, acb_ledger.lid
as lid from acb_transaction,acb_ledger where
acb_ledger.lid = acb_transaction.lid and
acb_ledger.cid =(select cid from cst_customer where
loginname = 'myname') and acb_ledger='t';

It is after the last one ( the select) query the
transaction is aborted. The query is ok. The select
query is executed successfully if it is not within a
transaction.

--- Christopher Kings-Lynne
<chriskl@familyhealth.com.au> wrote:

Hi Kancha,

Chances are you have a syntax error in the select
statement. Can you please
port the entire set of queries you are trying to run
and we'll look at them.

Chris

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf

Of Kancha .

Sent: Tuesday, 26 February 2002 2:35 PM
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: [SQL] transaction abortion

I'm in a situtation where transaction is aborted.

I'm

a newbie so please help.

I start transaction with begin then do some

queries

like update and insert. So far so good, but when i

run

select query within the transaction the whole
transaction is aborted.

what should i do ??

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

#4Kancha .
kancha2np@yahoo.com
In reply to: Christopher Kings-Lynne (#2)
Re: [SQL] transaction abortion

Sorry,

Please ignore my mails on this subject. Yes it was a
mistake in the select query.

Thanks for pointing out chrisopher.

--- Christopher Kings-Lynne
<chriskl@familyhealth.com.au> wrote:

Hi Kancha,

Chances are you have a syntax error in the select
statement. Can you please
port the entire set of queries you are trying to run
and we'll look at them.

Chris

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf

Of Kancha .

Sent: Tuesday, 26 February 2002 2:35 PM
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: [SQL] transaction abortion

I'm in a situtation where transaction is aborted.

I'm

a newbie so please help.

I start transaction with begin then do some

queries

like update and insert. So far so good, but when i

run

select query within the transaction the whole
transaction is aborted.

what should i do ??

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------(end of

broadcast)---------------------------

TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the
unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

#5Martijn van Oosterhout
kleptog@svana.org
In reply to: Kancha . (#1)
Re: transaction abortion

On Mon, Feb 25, 2002 at 10:35:14PM -0800, Kancha . wrote:

I'm in a situtation where transaction is aborted. I'm
a newbie so please help.

I start transaction with begin then do some queries
like update and insert. So far so good, but when i run
select query within the transaction the whole
transaction is aborted.

what should i do ??

Look at the error message and use that to fix the problem.
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/

Show quoted text

If the company that invents a cure for AIDS is expected to make their
money back in 17 years, why can't we ask the same of the company that
markets big-titted lip-syncing chicks and goddamn cartoon mice?