Re: plans for PostgreSQL 12

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: plans for PostgreSQL 12
Дата
Msg-id 709891ff-a0e8-04e4-20a1-bb80bcc2a37e@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: plans for PostgreSQL 12  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: plans for PostgreSQL 12  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 04/06/18 09:37, Pavel Stehule wrote:
> 
> 
> 2018-06-04 9:24 GMT+02:00 Heikki Linnakangas <hlinnaka@iki.fi
> <mailto:hlinnaka@iki.fi>>:
> 
>     On 04/06/18 09:12, Pavel Stehule wrote:
> 
>         It requires introduction of new "safe" functions (& operators).
>         Immutable
>         functions are not enough safe.
> 
>         CREATE OR REPLACE FUNCTION public.fx()
>           RETURNS integer
>           LANGUAGE plpgsql
>           IMMUTABLE
>         AS $function$
>         BEGIN
>            RETURN (SELECT count(*) FROM pg_class);
>         END;
>         $function$
> 
>         postgres=# SELECT fx();
>         ┌─────┐
>         │ fx  │
>         ╞═════╡
>         │ 343 │
>         └─────┘
>         (1 row)
> 
> 
>     That function is incorrectly marked as IMMUTABLE. In that situation,
>     it's enough that we throw a sane error like "ERROR: no snapshot
>     available".
> 
> Yes, it is incorrect mark. Unfortunately - this is often workaround for
> wrong estimations - so I afraid, in this case, your proposed fix breaks
> lot of applications.

I would say such applications are already broken.
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: plans for PostgreSQL 12
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Spilling hashed SetOps and aggregates to disk