restart point vs restartpoint in the docs

2025-12-02 Thread Daniel Gustafsson
While doing something else I noticed that we have 25 uses of "restartpoint" and
three "restart point":

$ git grep -i "restartpoint[s]\?[ .,;]" doc/ | wc -l
  25
$ git grep -i "restart point[s]\?[ .,;]" doc/ | wc -l
   3

Any objection to applying the attached to make those three "restartpoint" to
keep the docs consistent?

--
Daniel Gustafsson



restartpoint.diff
Description: Binary data


Add "current_setting('role');" to trigger function examples of audit tables

2025-12-02 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/plpgsql-trigger.html
Description:

The doc page https://www.postgresql.org/docs/18/plpgsql-trigger.html
contains examples of using trigger functions to make an audit table. When
SECURITY DEFINER is used in conjunction with SET ROLE it was not clear to me
how to store the acting role in the audit table rather than the owner of the
trigger function (i.e. current_user, session_user).

I found an old mailing list message
https://www.postgresql.org/message-id/flat/000801c64143%24313bba50%241e01a8c0%40weasel
that suggests using "current_setting('role');", and seems to do exactly what
I need. This seems to be little known information as searching the web
suggests all sorts of different workarounds for this scenario with BEFORE
triggers or creating custom settings. Therefore I suggest this knowledge is
rediscovered and mentioned in the official documentation in
plpgsql-trigger.html.


Re: restart point vs restartpoint in the docs

2025-12-02 Thread Laurenz Albe
On Tue, 2025-12-02 at 10:36 +0100, Daniel Gustafsson wrote:
> While doing something else I noticed that we have 25 uses of "restartpoint" 
> and
> three "restart point":
> 
> $ git grep -i "restartpoint[s]\?[ .,;]" doc/ | wc -l
>   25
> $ git grep -i "restart point[s]\?[ .,;]" doc/ | wc -l
>    3
> 
> Any objection to applying the attached to make those three "restartpoint" to
> keep the docs consistent?

No objection - I think that is a clear improvement.

Yours,
Laurenz Albe




Re: restart point vs restartpoint in the docs

2025-12-02 Thread Michael Paquier
On Tue, Dec 02, 2025 at 10:36:30AM +0100, Daniel Gustafsson wrote:
> Any objection to applying the attached to make those three "restartpoint" to
> keep the docs consistent?

Works for me.
--
Michael


signature.asc
Description: PGP signature