From: M Simms <grim@argh.demon.co.uk>
To: pgsql-sql@postgresql.org
Subject: Incrimenting question
Date: Sun, 15 Nov 1998 13:18:28 +0000 (GMT)
Message-ID: <199811151318.NAA21545@argh.demon.co.uk> (raw)
I have a question regarding incrimenting values. I have looked but cannot find
any definite answers in the documentation.
In an example in the documentation, it is shown:
update weather set temp_hi=temp_hi-1,temp_lo=temp_lo-2
where date > '11/28/1994';
Now, this does NOT clearly tell me how safe this action is. I am looking
for a safe way to do that that ensures that if this action is performed
twice at the same time by different people, that it WILL be incrimented
twice.
I am writing a counter for a webpage and need to know that when I do
update pagestat set hitcount=hitcount+1 where page='main';
that it will count every hit and not just drop hits if 2 people access at
the same moment. It is a very busy page.
Otherwise I am going to have to create sequences for EVERY page and thats going
to really defeat the reason for using an RDB.
Thanks in advance
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: grim@argh.demon.co.uk
Subject: Re: Incrimenting question
In-Reply-To: <199811151318.NAA21545@argh.demon.co.uk>
References: <199811151318.NAA21545@argh.demon.co.uk>
* 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