Select for insert possible?

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: pgsql-general(at)postgresql(dot)org
Subject: Select for insert possible?
Date: 2001-03-24 17:52:16
Message-ID: 3.0.5.32.20010325015216.00fecd30@192.228.128.13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-24 17:59:51 Re: Select for insert possible?
Previous Message Christian Marschalek 2001-03-24 17:30:06 Prefered programs and utils?