Re: Query Planner Issue - View and regexp_replace?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query Planner Issue - View and regexp_replace?
Дата
Msg-id 5172.1203298950@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query Planner Issue - View and regexp_replace?  (Brandon Kane <brandonk98@yahoo.com>)
Список pgsql-novice
Brandon Kane <brandonk98@yahoo.com> writes:
> Yes, this turns out to be a volatile user-defined function.  Is there
> some specific part of the documentation you can point me to that helps
> explain why a volatile function might affect the plan for a column not
> involved in select or join operations?

I don't believe it's documented anywhere outside the source code, but
the short explanation is that the planner won't flatten the view for
fear of introducing extra evaluations of the volatile function.
(The fact that it isn't actually used at all doesn't help, because
we don't know that at the point where this decision has to be made.)

You could search the archives for the discussions leading to this patch:
http://archives.postgresql.org/pgsql-committers/2006-08/msg00358.php

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump, pg_restore and template relationships
Следующее
От: "Nicholas Hemley"
Дата:
Сообщение: postgres 8.3 & ident authentication