concurent updates

Поиск
Список
Период
Сортировка
От Steve SAUTETNER
Тема concurent updates
Дата
Msg-id BKEHJDOFOAHJBCOBCHJGKEHACCAA.ssa@informactis.com
обсуждение исходный текст
Ответы Re: concurent updates  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
hi everybody !

I've got a little problem when updating a primary key in two table
where the primary key of the one is a foreign key from the second :

here are the 2 tables :

create table table1 (id int primary key, col1 int);
create table table2 (id int primary key references table1(id), col2 int);

and the 2 updates :

1) update table2 set id = 1001 where id = 1;
2) update table1 set id = 1001 where id = 1;

i can't execute them separately because of an integrity constraint
violation.
i've got the same error in a BEGIN / COMMIT block containing the updates.

Does any one see how two help me ?

thanks.


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

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: ODBC PG error
Следующее
От: Joel Burton
Дата:
Сообщение: Re: diff's between creations of tables