Re: Deferrable Unique Constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Deferrable Unique Constraints
Дата
Msg-id 19003.1106769473@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Deferrable Unique Constraints  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Deferrable Unique Constraints
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Off the top of my head it seems the way to go about doing this would be to
> simply not insert the records in the index until commit time. This doesn't
> actually sound so hard, is there any problem with this approach?

Yeah:begin;insert into foo (key, ...) values (33, ...);select * from foo where key = 33;...

If the SELECT uses an indexscan it will fail to find the just-inserted
row.
        regards, tom lane


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