Select for insert possible? - Mailing list pgsql-general

From Lincoln Yeoh
Subject Select for insert possible?
Date
Msg-id 3.0.5.32.20010325015216.00fecd30@192.228.128.13
Whole thread Raw
Responses Re: Select for insert possible?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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.

What cases would it be useful for select ... for update to _not_ block
other select ... for updates when no rows exist yet?

Are there RDBMSes with a command to atomically update if stuff already
exists, and insert if it doesn't?

Would anyone else find this useful?

Cheerio,
Link.


pgsql-general by date:

Previous
From: "Christian Marschalek"
Date:
Subject: Prefered programs and utils?
Next
From: Tom Lane
Date:
Subject: Re: Select for insert possible?