Re: [PATCH] Implement motd for PostgreSQL

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr>
Cc: "PostgreSQL Developers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Michael Paquier" <michael(at)paquier(dot)xyz>
Subject: Re: [PATCH] Implement motd for PostgreSQL
Date: 2021-04-03 09:54:56
Message-ID: 6a5a785c-1375-4ac6-a6bb-53487fb24575@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 3, 2021, at 10:14, Fabien COELHO wrote:
>
> Hello Joel,
>
> > This patch is one day late, my apologies for missing the deadline this year.
> >
> > PostgreSQL has since long been suffering from the lack of a proper UNIX style motd (message of the day).
>
> My 0.02€: apart from the Fool's day joke dimension, I'd admit that I would
> not mind actually having such a fun feature in pg, possibly disabled by
> default.

Fun to hear you find it useful.
I'm actually using it myself in production for something, to display instructions to users when they login.

When implementing this I stumbled upon newlines can't be used in ALTER SYSTEM parameter values.

I see they were disallowed in commit 99f3b5613bd1f145b5dbbe86000337bbe37fb094

However, reading escaped newlines seems to be working just fine.
The commit message from 2016 seems to imply otherwise:

"the configuration-file parser doesn't support embedded newlines in string literals"

The first patch, 0001-quote-newlines.patch, fixes the part of escaping newlines
before they are written to the configuration file.

Perhaps the configuration-file parser has been fixed since to support embedded newlines?
If so, then maybe it would actually be an idea to support newlines by escaping them?
Especially since newlines are supported by set_config().

/Joel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-04-03 10:02:54 Re: Refactoring HMAC in the core code
Previous Message vignesh C 2021-04-03 09:39:06 Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?