.bash_profile in terminal

This step is no longer required if you are using Postgres 9.3 or later. All current installers use Postgres 9.6 or later.
The .bash_profile settings should to be entered in the Terminal session for the postgres user to establish the commonly used paths for the database and the executable binary files. This is always set up if you are using the Theatre Manager installers for Postgres. If you install your own version of Postgres, you may need to do this IF YOU PLAN ON USING TERMINAL to interface with Postgres on a frequent basis.

Otherwise, this step is not required under most circumstances.

1. Start Terminal and navigate to the home directory for postgres user.

Type:

cd /Library/PostgreSQL/9.3

2. Next, let's update the profile for Terminal to that it makes life easier in Postgres from this point on. Type

vi ~/.bash_profile

it will open with an empty window as below.

bashProfile

Just like when using VI for the other two files, type:

I

to put you in insert mode

3. bashProfile

Type the two lines into the file exactly as shown. When done, type, in this order:

hit the 'esc' key

(the insert mode will dissappear)

Shift Q

(the window will show the 'Entering Ex mode' message)

wq

and the window will clear and you will be back at Terminal. The next time you start Terminal under the Postgres user account, you will have access to the Postgres commands and data directory in a more convenient fashion.