Re: timed messages

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: hans(at)matfyz(dot)cz, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: timed messages
Date: 2020-11-16 22:00:22
Message-ID: CAKFQuwbwvJq3e-qJxB01=S9oYB+uz3efj0d5VeYYPMkF+dPuZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Nov 16, 2020 at 2:08 PM PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/plpgsql-errors-and-messages.html
> Description:
>
> Please add an example how to format messages, that they will contain
> timestamp.

The only thing the format string gives you is the ability to specify % in a
location and supply the content to print in that location via the optional
expression list. If you want to print a timestamp you would need to set it
up yourself, probably using to_char(timestamp) as an expression.

Ideally through global/session configuration format for raise
> messages.
>
>
That isn't a thing in PostgreSQL.

You can set up a log file line format that includes such things, but the
raw message content for RAISED is no more or less than what you either type
literally or it computes from format+expressions.

David J.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Fujii Masao 2020-11-18 13:49:10 Re: Documentation of return values of range functions lower and upper
Previous Message PG Doc comments form 2020-11-16 20:05:43 timed messages