Re: BUG #10254: Joined Constraints not invoked on date ranges

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #10254: Joined Constraints not invoked on date ranges
Дата
Msg-id 5962.1399499355@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #10254: Joined Constraints not invoked on date ranges  (christopher.hamel@zimmer.com)
Список pgsql-bugs
christopher.hamel@zimmer.com writes:
> If I specifically invoke the range on both the h and l tables, it will work
> fine, but since the join specifies those fields have to be the same, can
> that condition be propagated automatically?

No.  We currently deduce equality transitively, so the planner is able to
extract the constraint l.transaction_date = '2014-03-01' from your query
(and then use that to reason about the check constraints on l's children).
But there's nothing comparable for inequalities, and it's not clear that
adding such logic to the planner would be a net win.  It would be more
complicated than the equality case and less often useful.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #10256: COUNT(*) behaves sort of like RANK() when used over a window containing an ORDER BY
Следующее
От: Emanuel Calvo
Дата:
Сообщение: Re: BUG #10255: CREATE COLLATION bug on 9.4