Re: Select for update

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Select for update
Дата
Msg-id 42E8C2A5.60700@archonet.com
обсуждение исходный текст
Ответ на Select for update  (Havasvölgyi Ottó <h.otto@freemail.hu>)
Список pgsql-general
Havasvölgyi Ottó wrote:
> Hi,
>
> Is it normal that when I select for update a record, but I don't select
> all the fields, that the contents of fields not selected will be deleted:
>
> create table pidtest(pid integer, szoveg text) without oids;
>
> select pid from pistest where pid>5 for update;
>
> After committing (autocommit), the contents of the szoveg field for the
> locked rows will be erased.

Committing what? You're not updating anything here. The "SELECT...FOR
UPDATE" just locks the rows so you can update them, it doesn't perform
the update.

--
   Richard Huxton
   Archonet Ltd


В списке pgsql-general по дате отправления:

Предыдущее
От: Havasvölgyi Ottó
Дата:
Сообщение: Select for update
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Select for update