Re: queston about locking

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Ottavio Campana *EXTERN*" <ottavio(at)campana(dot)vi(dot)it>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: queston about locking
Date: 2007-09-21 08:20:47
Message-ID: D960CB61B694CF459DCFB4B0128514C23C6E5A@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ottavio Campana wrote:
> I'm writing a python script to update some tables in a db. My
> problem is
> that I need to lock a couple of tables, perform several operations and
> read the corresponding output.
>
> I was thinking about lock in exclusive mode, but in the
> documentation I
> found that it is valid only in a transaction. But since I need to
> execute a command and read the output and so forth, I think I
> cannot use
> a transaction.
>
> What would you use to lock the table?

What makes you think that you "need to lock a couple of tables"?

Maybe there is a different, less invasive way to solve your
problem. What do you want to achieve?

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-09-21 08:30:58 Re: autovacuum
Previous Message Albe Laurenz 2007-09-21 07:34:52 Re: Postgresql and SSL