![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, we are using postgres for a web application program. My colleague wrote some code that I suppose is not safe: basically we have a counter, a integer column in the db, and he choose the value -1 as the value to represent infinite. The code should decrease the counter value by 1 each time the user consume a service. I fear this is not much thread safe and feel uneasy with the solution...should I stop worrying? regards Jim |
#3
| |||
| |||
|
|
Huh? Multiple threads? Threads do not belong to the RDBMS terminology. RDBMS is all about transactions and sessions. Can you provide a more detailed explanation of the problem? |
#4
| |||
| |||
|
|
Mladen Gogala <gogala.mla... (AT) gmail (DOT) com> wrote: Huh? Multiple threads? Threads do not belong to the RDBMS terminology. RDBMS is all about transactions and sessions. Can you provide a more detailed explanation of the problem? yep you're right... it's a problem related to the application, not to the db. |
![]() |
| Thread Tools | |
| Display Modes | |
| |