Received: from argh.demon.co.uk (IDENT:grim@argh.demon.co.uk [193.237.6.55]) by hub.org (8.9.1/8.9.1) with ESMTP id IAA28118 for ; Sun, 15 Nov 1998 08:18:48 -0500 (EST) (envelope-from grim@argh.demon.co.uk) Received: (from grim@localhost) by argh.demon.co.uk (8.8.7/8.8.7) id NAA21545 for pgsql-sql@postgresql.org; Sun, 15 Nov 1998 13:18:29 GMT From: M Simms Message-Id: <199811151318.NAA21545@argh.demon.co.uk> Subject: Incrimenting question To: pgsql-sql@postgresql.org Date: Sun, 15 Nov 1998 13:18:28 +0000 (GMT) Content-Type: text 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