Incrimenting question
От | M Simms |
---|---|
Тема | Incrimenting question |
Дата | |
Msg-id | 199811151318.NAA21545@argh.demon.co.uk обсуждение исходный текст |
Ответы |
Re: [SQL] Incrimenting question
|
Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: