Re: [BUGS] BUG #14715: Constraint exclusion isn't used in functionusing language sql

Поиск
Список
Период
Сортировка
От Kyotaro HORIGUCHI
Тема Re: [BUGS] BUG #14715: Constraint exclusion isn't used in functionusing language sql
Дата
Msg-id 20170623.103957.31224862.horiguchi.kyotaro@lab.ntt.co.jp
обсуждение исходный текст
Ответ на [BUGS] BUG #14715: Constraint exclusion isn't used in function usinglanguage sql  (cliveevans@ntlworld.com)
Ответы Re: [BUGS] BUG #14715: Constraint exclusion isn't used in functionusing language sql  (Clive Evans <cliveevans@ntlworld.com>)
Список pgsql-bugs
Hello,

At Wed, 21 Jun 2017 14:00:56 +0000, cliveevans@ntlworld.com wrote in
<20170621140056.27883.82221@wrigleys.postgresql.org>
> PostgreSQL version: 9.6.3
...
> The same query written using PL/PGSQL will only scan the expected partition
> tables.

The two are different in that the parameters of the PL/PgSQL
function are regarded as constants at the time of planning of the
inner SQL statement, while those of the SQL function are
not. Constraint exclusion is considered while planning so the SQL
function doesn't get benefit of it.

This doesn't seem a bug, but I couldn't find such a description
in the documentation, though. Maybe it should be here.

https://www.postgresql.org/docs/9.6/static/ddl-partitioning.html#DDL-PARTITIONING-CAVEATS

regareds,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [BUGS] Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
Следующее
От: Clive Evans
Дата:
Сообщение: Re: [BUGS] BUG #14715: Constraint exclusion isn't used in functionusing language sql