Re: How to use read uncommitted transaction level and set update order
От
Jaime Casanova
Тема
Re: How to use read uncommitted transaction level and set
update order
Дата
Msg-id
3073cc9b0912280738s45512326p5ce21a097776a855@mail.gmail.com
Ответ на
Re: How to use read uncommitted transaction level and set update order (Christophe Pettus)
Список
Дерево обсуждения
Re: How to use read uncommitted transaction level and set update order "Albe Laurenz" <laurenz.albe@wien.gv.at>
On Sat, Dec 19, 2009 at 7:16 PM, Christophe Pettus wrote: > >> I understand that it is not possible to read previous rows without >> creating hack using triggers. > > As noted above, that's not correct. You cannot access new values of a > particular row within a single UPDATE statement, but you do see new values > done in the same transaction. > what´s the problem with something as simple as: create function keep_a_in_b_test1() returns trigger as $$ begin new.b = old.a; return new; end; $$ language plpgsql; create trigger trg_keep_a_in_b_test1 before update on test1 for each row execute procedure keep_a_in_b_test1(); -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
В списке pgsql-general по дате отправления