Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-14 Thread Kevin Grittner
David Noel wrote: > I've read through the documentation, found a few examples using > "for update" syntax, and it looks like you're right. Would > transaction level SERIALIZABLE also work? It does seem messier > though, having to handle errors thrown due to concurrent > transactions. The SERIALI

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-14 Thread Ralf Schuchardt
Am 13.09.2013 um 18:47 schrieb David Noel : >> ...have you used the "for update" clause in your select statements? > > Hi Ralf, thanks for the reply. I was unaware of the "for update" > construct. Thank you! > >> My understanding is, that "for update" does what you need. > [...] > My question

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-13 Thread rob stone
Hello David, I replied to your original e-mail but it must have vanished into the ether. I sent you a brief precis about transaction processing. For "SELECT FOR UPDATE" to function, you MUST have an unique key on the table. For example:- crawlq_id SERIAL NOT NULL PRIMARY KEY USING INDEX TABLESPA

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-13 Thread David Noel
> ...have you used the "for update" clause in your select statements? Hi Ralf, thanks for the reply. I was unaware of the "for update" construct. Thank you! > My understanding is, that "for update" does what you need. I've read through the documentation, found a few examples using "for update" s

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread rob stone
On Thu, 2013-09-12 at 06:40 -0500, David Noel wrote: > I have a few database queries that I've been running from within a > Java project. I have recently come to the understanding that I need to > run them instead within the PostgreSQL server as stored functions. I > have that understanding becau

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread Ralf Schuchardt
Hi David, have you used the "for update" clause in your select statements? With this clause "select" locks the selected row(s) in a table for modifications and other "select for updates". My understanding is, that "for update" does what you need. You can execute your select and update statement

[GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread David Noel
I have a few database queries that I've been running from within a Java project. I have recently come to the understanding that I need to run them instead within the PostgreSQL server as stored functions. I have that understanding because I need to make use of locking functionality, and that seems