YOU/postgresql-9.4.6"; $pgInstall = "/srvr/YOU/pgsql"; echo startPage("Prac Exercise $exID","","Modifying a PostgreSQL Client Program"); ?>

Aims

This simple exercise aims to get you to: You ought to get it done by the end of Week 4.

Exercise

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:

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.

Some things not to do:

End of Prac

Let me know via the MessageBoard or come to a consultation if you have any problems with this exercise ... jas