Project

General

Profile

Actions

Bug #593

closed

Viewing VegBank tables directly

Added by Michael Lee over 22 years ago. Updated over 18 years ago.

Status:
Resolved
Priority:
Immediate
Category:
misc
Target version:
Start date:
09/16/2002
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
593

Description

Bob, Mike Jennings, and Michael Lee need to be instructed (and given
permissions) to access the SQL prompt on VegBank to issue queries directly
against the database to view contents of the various tables. And we will need
the capacity to write these query results to file. Any more user friendly
approached that John might know of would be great. This is a critical step in
quality assurance dealing with the loading process.

Actions #1

Updated by Gabriel Farrell about 22 years ago

A user called qa has been setup for the database and server (contact me for
password)

ssh

INSTRUCTIONS:
psql is the command for sql access to database.
Please use man sql to get more information on usage. Below are some
things to get you started.
This sql shell has tab-completion, command history and many other user
friendly and powerfull features.

Connect to database:
$ psql [database_name]
i.e. plants_dev, plot_dev, communities_dev and framework

you should see;
db_name=#

now you can run commands or querys.
db_name=# \d
desribes current db (i.e.) lists tables
db_name=# select * from table;
run sql commands .. note the semi-colon

db_name=# \q
quit progam

Run a query and save output in a file:
db_name=# select plantname from plantconcept; \g outputfile
QUERY SWITCH FILENAME

Save all query results of this session to a file
db_name=# \o filename
Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 593

Actions

Also available in: Atom PDF