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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to