From: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
---|---|
To: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Solution to UPDATE...INSERT problem |
Date: | 2003-03-28 05:37:36 |
Message-ID: | 5.1.0.14.1.20030328132723.02d9bdc0@mbox.jaring.my |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
At 05:28 PM 3/27/03 +0800, Christopher Kings-Lynne wrote:
> > There's no "select * from table where pkey=x for insert;" which would
>block
> > on uncommitted inserts/updates of pkey=x and other selects for
>insert/update.
>
>How about user locks? Isn't there something in contrib/ for that??? I
>could do a userlock on the primary key, whether it existed or not?
Depends on your case, whether you can correctly convert your potential
primary keys into integers to be locked on.
It still requires full cooperation by all relevant apps/clients.
Actually select ... for updates also require cooperation, but it's a
standard way of doing things, so apps that don't cooperate can be said to
be broken :).
Is there a standard for "select ... for insert"? Or lock table for insert
where pkey=x?
Regards,
Link.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-03-28 05:46:15 | Re: missing FROM-clause notice but nothing is missing ... |
Previous Message | Jean-Christian Imbeault | 2003-03-28 05:28:48 | Re: missing FROM-clause notice but nothing is missing ... |
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2003-03-28 06:11:43 | Re: updateable cursors & visibility |
Previous Message | Han | 2003-03-28 04:34:57 | Re: updateable cursors & visibility |