Partitioning and constraint exclusion

Поиск
Список
Период
Сортировка
От Sylvain Rabot
Тема Partitioning and constraint exclusion
Дата
Msg-id BANLkTikYQXH8GQbnswrJpOEKFfR7b3i8qg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Partitioning and constraint exclusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi list,

I'm trying to do some partitioning on a table but I have a problem
with constraint exclusion.

Here the following code : https://gist.github.com/1038133

(this code is just an example to explain the problem)

As you can see I declare a fake immutable function in order to make
constraint exclusion work even
if the function is not immutable at all.

On Postgres 9.1beta2 when i run this code the first select will use
contraint exclusion but the second will not.
This apparently has something to do with the size of the array
returned by the fake immutable function.

Is there a way to force the use of constraint exclusion no matter the
size of the array used in the check constraint ?

Regards.

--
Sylvain

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: LISTEN filtering
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LISTEN filtering