Re: [GENERAL] Using ctid in delete statement - Mailing list pgsql-general

From pinker
Subject Re: [GENERAL] Using ctid in delete statement
Date
Msg-id 1487259751007-5944733.post@n3.nabble.com
Whole thread Raw
In response to Re: [GENERAL] Using ctid in delete statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Using ctid in delete statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian Klaver-4 wrote
> Exactly, they do not have it whereas:
>
> https://www.postgresql.org/docs/9.6/static/sql-select.html#SQL-FOR-UPDATE-SHARE

Still not much. The documentation could be more verbose on this topic. I can
only presume that since there is an example with select:
SELECT * FROM (SELECT * FROM mytable FOR UPDATE) ss WHERE col1 = 5;
it's propably possible, but there is no information when the lock is
released (on commit like in oracle?) especially if there is no explicit
BEGIN/END clause like in this case.


Oracle documentation is much more clear about it:
You can also use SELECT FOR UPDATE to lock rows that you do not want to
update, as in Example 9-6.
<http://docs.oracle.com/database/122/LNPLS/static-sql.htm#LNPLS00609>







--
View this message in context: http://postgresql.nabble.com/Using-ctid-in-delete-statement-tp5944434p5944733.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Using ctid in delete statement
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Using ctid in delete statement