Re: Check constraints and function volatility categories

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Check constraints and function volatility categories
Дата
Msg-id 56AFB4D5.9030602@aklaver.com
обсуждение исходный текст
Ответ на Check constraints and function volatility categories  (Dane Foster <studdugie@gmail.com>)
Ответы Re: Check constraints and function volatility categories  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Check constraints and function volatility categories  (Dane Foster <studdugie@gmail.com>)
Список pgsql-general
On 02/01/2016 11:17 AM, Dane Foster wrote:
> Hello,
>
> I'm discovering that I need to write quite a few functions for use
> strictly w/ check constraints and I'm wondering if declaring the
> volatility category for said functions will affect their behavior when
> invoked by PostgreSQL's check constraint mechanism.
>
> Essentially what I'm trying to figure out is if volatility categories
> increase or decrease the latency of executing check constraints. I've
> done some micro benchmarks but I have no experience benchmarking
> anything in PostgreSQL to trust that I'm measuring the right thing. So
> I'm asking the experts.

The above is sort of backwards. You need to ask what the function does
and from that determine what is the most appropriate volatitity
category. For more detailed info see:

http://www.postgresql.org/docs/9.5/interactive/xfunc-volatility.html

It would help to see some samples of the actual functions.

>
> I'm running PostgreSQL 9.5 on Ubuntu Linux 15.10. I don't know if this
> matters but this is my workstation which is a pretty zippy AlienWare X51
> w/ 16GB RAM on a Core i7-4770 processor.
>
> Thanks,
>
> Dane


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: strange sql behavior
Следующее
От: melvin6925
Дата:
Сообщение: Re: strange sql behavior