Search Postgresql Archives

Re: existing row not found by SELECT ... WHERE CTID = ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Analizing our logs in more detail, we got to know that there are cases
where, after updating a row with something like:

     EXEC SQL UPDATE d01buch SET
                d01gsi =:d01gsi,
                d01ex  =:d01ex,
                ...
                d01vldate =:d01vldate
     WHERE CURRENT OF hc_d01buch;

we look-up the same row later again with its old CTID in :rowid; one solution
of it could be right after the UPDATE look-up the new CTID with:

     EXEC SQL SELECT ctid INTO :rowid FROM d01buch WHERE CURRENT OF hc_d01buch;

i.e. using the same CURSOR which was used for the UPDATE again for a
SELECT for the CTID. Can this work?

	matthias
-- 
Matthias Apitz, ✉ guru@xxxxxxxxxxx, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux