Re: [INTERFACES] Transaction: Begin, Lock

From: Margarita Barvinok <brita(at)umich(dot)edu>
To: Michael Meskes <meskes(at)postgreSQL(dot)org>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Transaction: Begin, Lock
Date: 1999-09-15 13:02:29
Message-ID: Pine.SOL.4.10.9909150900280.16800-100000@joust.rs.itd.umich.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Michael, thank you very much.
I didn't know this.

-Margarita

On Tue, 14 Sep 1999, Michael Meskes wrote:

> > 1. Why i get the following message when I run this code?
> > NOTICE: BeginTransactionBlock and not in default state
>
> I take it you did not use 'ecpg -t' did you? The normal situation is that
> ecpg creates a auto-transaction mode, i.e. a transaction is started
> automatically. You only need to issue a COMMIT once you finish your
> transaction resp. a ROLLBACK if you want to cancel it.
>
> So you tell the backend to start a transaction while already inside a
> transaction. And that cannot work.
>
> You can either just remove the BEGIN WORK statement or you always give
> option '-t' to ecpg.
>
> > 2. How should I lock the table phonebook during this transaction?
>
> Why do you need that? You do not need an explicit lock for the delete to
> work.
>
> Michael
> --
> Michael Meskes | Go SF 49ers!
> Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
> Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
> Email: Michael(at)Fam-Meskes(dot)De | Use PostgreSQL!
>

-------------------------------
Margarita Barvinok
System Administrator II
University of Michigan
Department of Biology
-------------------------------

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Craig Orsinger 1999-09-15 18:21:55 RE: RE[2]: [INTERFACES] ecpg and getting just assigned serial nu
Previous Message Michael Meskes 1999-09-15 08:37:24 Re: [INTERFACES] ecpg and getting just assigned serial number