Re: Strange behavior of function date_trunc - Mailing list pgsql-general

From Pavel Luzanov
Subject Re: Strange behavior of function date_trunc
Date
Msg-id 8f74291a-0f7d-dc04-9419-cb6623343fe1@postgrespro.ru
Whole thread Raw
In response to Re: Strange behavior of function date_trunc  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
David,


On 06.05.2021 17:28, David G. Johnston wrote:
On Thu, May 6, 2021 at 6:44 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
This case is the reason we invented the "stable" attribute to begin
with.  People have since misinterpreted it as authorizing caching of
function results, but that's not what it was intended for.


This is a good paragraph...if something like it gets added to the create function documentation mis-interpretations are likely to decrease.


I found additional details in the documentation. In particular about the index scanning for stable functions:
https://www.postgresql.org/docs/13/xfunc-volatility.html

The link to this section there is in the create function page. Maybe that's enough.
--
Pavel Luzanov
Postgres Professional: https://postgrespro.com
The Russian Postgres Company

pgsql-general by date:

Previous
From: Pavel Luzanov
Date:
Subject: Re: Strange behavior of function date_trunc
Next
From: Adrian Klaver
Date:
Subject: Re: trigger impacting insertion of records