Re: is it a known issue or just a bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: is it a known issue or just a bug?
Дата
Msg-id 1644.1096917912@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: is it a known issue or just a bug?  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Ответы Re: is it a known issue or just a bug?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> Josh Berkus wrote:
>> Frankly, I don't think there *is* any safe way to use volatile functions in 
>> subqueries -- I certainly avoid it, except now() and random() which as 
>> discussed are special cases.    Perhaps a WARNING is in order? 

> Personally I like Josh's idea. A warning would be a nice thing.

From the planner's perspective, it would have to warn about any volatile
function, which would probably be overly chatty --- remember that the
default marking for user-defined functions is "volatile".

This default may also be a good reason not to put in the anti-flattening
defenses I suggested before, because it would mean that even slight
sloppiness in the definition of a user function could cripple subquery
optimization.  I'm not sure that that's a strong argument, but it's
something to think about.

It'd be easy enough to put in the anti-flattening defenses (checks (1)
and (2) in my prior message) but I've got mixed emotions about whether
this is really a good thing to do.  Any opinions out there?
        regards, tom lane


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

Предыдущее
От: Reini Urban
Дата:
Сообщение: Re: open item: tablespace handing in pg_dump/pg_restore
Следующее
От: Tom Lane
Дата:
Сообщение: Re: open item: tablespace handing in pg_dump/pg_restore