pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kancha . <kancha2np@yahoo.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [SQL] transaction abortion
Date: Mon, 25 Feb 2002 23:43:41 -0800 (PST)
Message-ID: <20020226074341.15101.qmail@web14914.mail.yahoo.com> (raw)
In-Reply-To: <GNELIHDDFBOCMGBFGEFOIEIOCBAA.chriskl@familyhealth.com.au>

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



view thread (5+ messages)  latest in thread

Message-ID: <20020226074341.15101.qmail@web14914.mail.yahoo.com>
Permalink:  ../20020226074341.15101.qmail@web14914.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020226074341.15101.qmail@web14914.mail.yahoo.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: kancha2np@yahoo.com, chriskl@familyhealth.com.au, pgsql-general@postgresql.org
  Subject: Re: [SQL] transaction abortion
  In-Reply-To: <20020226074341.15101.qmail@web14914.mail.yahoo.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