[GENERAL] Select for insert possible?

2001-03-24 Thread Lincoln Yeoh
Hi, Is it technically possible for there to be a "select for insert"? e.g. other select for inserts with the same effective where clause will block even if no rows are there yet. Or should select .. for update actually work that way? I think it's probably too difficult to implement it tho. Wha

Re: [GENERAL] Select for insert possible?

2001-03-24 Thread Tom Lane
Lincoln Yeoh <[EMAIL PROTECTED]> writes: > Is it technically possible for there to be a "select for insert"? e.g. > other select for inserts with the same effective where clause will block > even if no rows are there yet. What would you define as the "same effective where clause"? Shades of the

Re: [GENERAL] Select for insert possible?

2001-03-25 Thread Lincoln Yeoh
At 12:59 PM 3/24/01 -0500, Tom Lane wrote: >Lincoln Yeoh <[EMAIL PROTECTED]> writes: >> Is it technically possible for there to be a "select for insert"? e.g. >> other select for inserts with the same effective where clause will block >> even if no rows are there yet. > >What would you define as

Re: [GENERAL] Select for insert possible?

2001-03-25 Thread Tom Lane
Lincoln Yeoh <[EMAIL PROTECTED]> writes: > So I'll use "lock table" (this time in exclusive mode :) ), then select for > update, then insert|update and leave the unique index to trigger an error > when I forget to all that correctly, in which case it's definitely an error. If you're holding an e