Re: [PATCH] Implement motd for PostgreSQL
Joel Jacobson <joel@compiler.org>
From: "Joel Jacobson" <joel@compiler.org>
To: "Chapman Flack" <chap@anastigmatix.net>,
pgsql-hackers@lists.postgresql.org
Date: 2021-04-03T05:20:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Disallow newlines in parameter values to be set in ALTER SYSTEM.
- 99f3b5613bd1 9.6.0 cited
On Fri, Apr 2, 2021, at 22:59, Chapman Flack wrote:
> Slonik's backslashes are falling off. Eww.
>
> Regards,
> -Chap
Thanks for the bug report.
Fixed by properly escaping backslackes:
ALTER SYSTEM SET motd TO E'\u001B[94m'
'\n ____ ______ ___ '
'\n / )/ \\/ \\ '
'\n ( / __ _\\ )'
'\n \\ (/ o) ( o) )'
'\n \\_ (_ ) \\ ) / '
'\n \\ /\\_/ \\)_/ '
'\n \\/ //| |\\\\ '
'\n v | | v '
'\n \\__/ '
'\u001b[0m';
I've deployed the fix to production:
$ psql -U brad -h pit.org motd
NOTICE:
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) /
\ /\_/ \)_/
\/ //| |\\
v | | v
\__/
psql (14devel)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
motd=> \q
/Joel