The psql
client in earlier versions of PostgreSQL used to
have a much friendlier introductory message than the current version.
Nowadays, all that greets you when you start an interactive psql
session is:
$ psql mydb psql (9.4.6) Type "help" for help. mydb=#
Your task for this lab is simply to make the introductory message more
friendly. You must change the code for psql
so that it now
behaves as follows:
$ psql mydb
Welcome to the PostgreSQL 9.4.6 version of psql
Type "help" for help.
mydb=#
You should display this behaviour only when the user successfully
connects to a database. All other invocations of psql
should
appear the same as before.
Simple, eh? It would be if you were familiar with the PostgreSQL code-base. However, you'll need to work a few things out to accomplish this:
psql
?
psql
client once I've changed it?
Here are a few small hints to get you started. Since this is an exploratory lab, the idea is for you to work it our for yourself.
postgresql-9.4.6/src/bin
psql
source code is located
make
and make install
from within that directory
psql
Some things not to do:
make
from the top-level postgresql-9.4.6
directoryMakefile
, I'd say)
Let me know via the MessageBoard or come to a consultation if you have any problems with this exercise ... jas