Re: How to check for successfull inserts

From: "Arguile" <arguile(at)lucentstudios(dot)com>
To: "pgsql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to check for successfull inserts
Date: 2002-03-09 06:09:42
Message-ID: LLENKEMIODLDJNHBEFBOOEJAEFAA.arguile@lucentstudios.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arguile mistakenly wrote:
>
> The only other thing I can think of off the top of my head is to
> count(*) the table in question before and after and return the
> difference. As you're within a transaction it will be accurate,
> if rather unwieldy.

*Danger! Danger Will Robinson!*

I wasn't thinking properly when I typed this. For the count(*) to be
guaranteed accurate you would have to lock the table in at least a SHARE
MODE level lock. Probably not what you want.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark kirkwood 2002-03-09 10:49:48 Fsync on/off For Various Filesystems/Platforms
Previous Message Arguile 2002-03-09 05:41:49 Re: How to check for successfull inserts