Re: [PATCH] Implement motd for PostgreSQL - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: [PATCH] Implement motd for PostgreSQL
Date
Msg-id 6a5a785c-1375-4ac6-a6bb-53487fb24575@www.fastmail.com
Whole thread Raw
In response to Re: [PATCH] Implement motd for PostgreSQL  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [PATCH] Implement motd for PostgreSQL
Re: [PATCH] Implement motd for PostgreSQL
List 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

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?
Next
From: Michael Paquier
Date:
Subject: Re: Refactoring HMAC in the core code