Bug in MERGE's test for tables with rules

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Bug in MERGE's test for tables with rules
Дата
Msg-id CAEZATCVkBVZABfw71sYvkcPf6tarcOFST5Bc6AOi-LFT9YdccQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bug in MERGE's test for tables with rules  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
While playing around with rules and MERGE, I noticed that there is a
bug in the way that it detects whether the target table has rules ---
it uses rd_rel->relhasrules, which can be incorrect, since it might be
set for a table that doesn't currently have rules, but did in the
recent past.

So it actually needs to examine rd_rules. Technically, I think that it
would be sufficient to just test whether rd_rules is non-NULL, but I
think it's more robust and readable to check rd_rules->numLocks, as in
the attached patch.

Regards,
Dean

Вложения

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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Another multi-row VALUES bug
Следующее
От: David Rowley
Дата:
Сообщение: Re: Hash index build performance tweak from sorting