Re: [PATCH] Implement motd for PostgreSQL

Joel Jacobson <joel@compiler.org>

From: "Joel Jacobson" <joel@compiler.org>
To: "Marko Tiikkaja" <marko@joh.to>
Cc: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>, "Michael Paquier" <michael@paquier.xyz>
Date: 2021-04-03T06:50:54Z
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 →
  1. Disallow newlines in parameter values to be set in ALTER SYSTEM.

Attachments

On Fri, Apr 2, 2021, at 23:09, Marko Tiikkaja wrote:
> Hi Joel
> 
> On Fri, Apr 2, 2021 at 11:47 PM Joel Jacobson <joel@compiler.org> wrote:
>> PostgreSQL has since long been suffering from the lack of a proper UNIX style motd (message of the day).
> 
> First of all, thanks for your work on this!  I think this is an important feature to have, but I would love to see a way to have a set of strings from which you choose a random one to display.  That way you could brighten your day with random positive messages.
> 
> 
> -marko

Fun idea! I implemented it as a Perl script using the fortune command.

There are quite a lot of elephant jokes in the fortune database actually.

$ sudo apt install fortune-mod

$ crontab -l
0 0 * * * bash -c "/usr/local/bin/fortune_slony.pl | psql"

$ psql
NOTICE:
   ____  ______  ___
  /    )/      \/   \
(     / __    _\    )
  \    (/ o)  ( o)   )
   \_  (_  )   \ )  /
     \  /\_/    \)_/
      \/  //|  |\\
          v |  | v
            \__/
Q: Know what the difference between your latest project
and putting wings on an elephant is?
A: Who knows?  The elephant *might* fly, heh, heh...

/Joel