Re: How to lock and unlock table in postgresql

From: John R Pierce <pierce(at)hogranch(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to lock and unlock table in postgresql
Date: 2011-11-17 07:20:05
Message-ID: 4EC4B5A5.1050403@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/16/11 11:16 PM, Siva Palanisamy wrote:
> Thanks for the solution. If I use currval('sqlname') in a loop of 70000 records, what will happen if a record is inserted manually? I guess it will alter the sequences, and wrong values/chain might be introduced in foreign tables in the below function. Could you please clarify me on this?

currval is consistent within the current transaction. another
transaction will see the different currval that its generated.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-11-17 07:49:41 Re: How to lock and unlock table in postgresql
Previous Message Siva Palanisamy 2011-11-17 07:16:07 Re: How to lock and unlock table in postgresql