Select for update

From: Yambu <hyambu(at)gmail(dot)com>
To: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Select for update
Date: 2021-05-26 09:26:17
Message-ID: CALhHtcA1f=mVPZ9adDTcCX2E0Zo57ZfMqs4ej=5G+OQA6N-zTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

May i know if i run the update below if the row select in SELECT FOR
UPDATE will not be available for selection during update?

UPDATE table1 set status_id=13 WHERE id= ( SELECT id FROM table2 where
status_id=1 LIMIT 1) RETURNING id into v_id;

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2021-05-26 12:27:24 Re: Select for update
Previous Message Yambu 2021-05-25 10:18:45 Re: Index creation