[evlatests] evlampts, psql replacing sqlplus
Bill Sahr
bsahr at nrao.edu
Wed Sep 11 14:44:43 EDT 2013
A previous posting (9/9/2013, "eliminating evlamon & lando-new,
technical details") provided information on how to convert
Java & python applications referencing the evlamon dbase to the
use of evlampts.
Any/all scripts using the Oracle based sqlplus processor to
access evlamon must also be converted to use the PostgreSQL
processor named psql to access evlampts.
PSQL, a few basics
If logging in while on the machine that is a postgres server, the
path to psql & a basic login are:
/opt/services/postgresql/bin/psql -d evlampts -U mptdata_r
and you will be prompted for the password associated with the
username "mptdata_r". If you have a different password & username
for evlampts, then go with what you are already using. If you
do not have a username &/or password for evlampts, please contact
Daniel Lyons or me.
Caveat:
/opt/services/postgresql/bin/psql only exists on the postgres servers.
/opt/local/bin/psql is on all the RHEL5 machines and the helpdesk is
working on RHEL6.
Once in psql, \h gets help with SQL statements & \? gets help
with psql commands. \d will list the tables. \d <table_name> will
show the fields in a table. Use \q to exit psql. Of course,
psql accepts standard SQL statements. Use up arrow & down arrow
to move through (and edit, if you wish) command history.
Documentation for PostgreSQL can be found at:
http://www.postgresql.org/docs/
We are currently running PostgreSQL 9.1.x.
The documentation for the psql commands can be found at:
http://www.postgresql.org/docs/9.1/static/app-psql.html
You'll probably find psql much easier to use than sqlplus.
Bill Sahr
More information about the evlatests
mailing list