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-04 05:55:16
Message-ID: 3e22556b-deb9-4872-aecf-c61919c27c83@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 3, 2021, at 17:50, Fabien COELHO wrote:
> > 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?
>
> Dunno.
>
> If such a feature gets considered, I'm not sure I'd like to actually edit
> pg configuration file to change the message.

For the ALTER SYSTEM case, the value would be written to postgresql.auto.conf,
and that file we shouldn't edit manually anyway, right?

>
> The actual source looks pretty straightforward. I'm wondering whether pg
> style would suggest to write motd != NULL instead of just motd.

That's what I had originally, but when reviewing my code verifying code style,
I noticed the other case it more common:

if \([a-z]* != NULL &&
119 results in 72 files

if \([a-z]* &&
936 results in 311 files

>
> I'm wondering whether it should be possible to designate (1) a file the
> content of which would be shown, or (2) a command, the output of which
> would be shown [ok, there might be security implications on this one].

Can't we just do that via plpgsql and EXECUTE somehow?

/Joel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-04-04 06:23:56 Re: [PATCH] Implement motd for PostgreSQL
Previous Message Jaime Casanova 2021-04-04 05:25:50 Re: Crash in BRIN minmax-multi indexes