Re: [PATCH] Implement motd for PostgreSQL

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Chapman Flack" <chap(at)anastigmatix(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Implement motd for PostgreSQL
Date: 2021-04-03 05:20:23
Message-ID: 7862146f-9094-4d26-8e93-a9aade36a7c7@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-04-03 05:20:46 Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax
Previous Message Joel Jacobson 2021-04-03 05:16:05 Re: [PATCH] Implement motd for PostgreSQL