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

Поиск
Список
Период
Сортировка
От Matthias Apitz
Тема Re: existing row not found by SELECT ... WHERE CTID = ?
Дата
Msg-id YpZYbcZCkKvbXRuU@c720-r368166
обсуждение исходный текст
Ответ на Re: existing row not found by SELECT ... WHERE CTID = ?  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
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@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



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

Предыдущее
От: Jeff Ross
Дата:
Сообщение: Logically replicated table has no visible rows
Следующее
От: Tim Kelly
Дата:
Сообщение: unoptimized nested loops