Re: [SQL] concurrency problem

2006-06-17 Thread Ash Grove
itly, where postgres > > store this locking information. > > Is both > > stmt.execute ("commit"); > > con.commit(); > > are both same. should i have to call > con.commit() method after > > stmt.execute("commit") > >

Re: [SQL] concurrency problem

2006-06-16 Thread Ash Grove
>INSERT INTO rcp_patient_visit_monitor ( >entry_no, patient_id, visit_date, > is_newpatient, > visit_type, is_medical, >is_review, is_labtest, is_scan, > is_scopy, is_xray, > weight, height) >VALUES ((SELECT > coalesce(max(entry_no)+1, 1

Re: [SQL] insert related data into two tables

2006-05-20 Thread Ash Grove
You need to manage the transaction: begin a transaction, execute your first insert, retrieve the ID with curr_val(), execute the sencond insert and commit the transaction. --- [EMAIL PROTECTED] wrote: > Hello, > > I have two tables like these: > > TABLE_1: people registry > fields: ID_T1, SURN

[SQL] is an explicit lock necessary?

2006-05-04 Thread Ash Grove
Hi, Does beginning a transaction put locks on the tables queried within the transaction? In the example below, is #2 necessary? My thought was that I would need to use an explicit lock to make sure that the sequence value I'm selecting in #4 is the same one that is generated from #3. I'm worried