After you login to linuxlab, you can use the command psql -h sql.csic.umd.edu to access PostgreSQL database. Use "man psql" for detail usage of the commnad. Then you can use \h for help with SQL commands, \? for help on internal slash commands and \q to quit. Below is an example for connecting to PostgreSQL database: ------------------------------------------------------------------------------- [cs424241@nauseous ~]$ psql -h sql.csic.umd.edu Welcome to psql 7.3.2, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit cs424241=> \h Available help: ABORT CREATE TABLE EXECUTE ALTER DATABASE CREATE TABLE AS EXPLAIN ALTER GROUP CREATE TRIGGER FETCH ALTER TABLE CREATE TYPE GRANT ALTER TRIGGER CREATE USER INSERT ALTER USER CREATE VIEW LISTEN ANALYZE DEALLOCATE LOAD BEGIN DECLARE LOCK CHECKPOINT DELETE MOVE CLOSE DROP AGGREGATE NOTIFY CLUSTER DROP CAST PREPARE COMMENT DROP CONVERSION REINDEX COMMIT DROP DATABASE RESET COPY DROP DOMAIN REVOKE CREATE AGGREGATE DROP FUNCTION ROLLBACK CREATE CAST DROP GROUP SELECT CREATE CONSTRAINT TRIGGER DROP INDEX SELECT INTO CREATE CONVERSION DROP LANGUAGE SET CREATE DATABASE DROP OPERATOR CLASS SET CONSTRAINTS CREATE DOMAIN DROP OPERATOR SET SESSION AUTHORIZATION CREATE FUNCTION DROP RULE SET TRANSACTION CREATE GROUP DROP SCHEMA SHOW CREATE INDEX DROP SEQUENCE START TRANSACTION CREATE LANGUAGE DROP TABLE TRUNCATE CREATE OPERATOR CLASS DROP TRIGGER UNLISTEN CREATE OPERATOR DROP TYPE UPDATE CREATE RULE DROP USER VACUUM CREATE SCHEMA DROP VIEW CREATE SEQUENCE END cs424241=> \? \a toggle between unaligned and aligned output mode \c[onnect] [DBNAME|- [USER]] connect to new database (currently "cs424241") \C [STRING] set table title, or unset if none \cd [DIR] change the current working directory \copy ... perform SQL COPY with data stream to the client host \copyright show PostgreSQL usage and distribution terms \d [NAME] describe table, index, sequence, or view \d{t|i|s|v|S} [PATTERN] (add "+" for more detail) list tables/indexes/sequences/views/system tables \da [PATTERN] list aggregate functions \dd [PATTERN] show comment for object \dD [PATTERN] list domains \df [PATTERN] list functions (add "+" for more detail) \do [NAME] list operators \dl list large objects, same as \lo_list \dp [PATTERN] list table access privileges \dT [PATTERN] list data types (add "+" for more detail) \du [PATTERN] list users \e [FILE] edit the query buffer (or file) with external editor \echo [STRING] write string to standard output \encoding [ENCODING] show or set client encoding \f [STRING] show or set field separator for unaligned query output \g [FILE] send query buffer to server (and results to file or |pipe) \h [NAME] help on syntax of SQL commands, * for all commands \H toggle HTML output mode (currently off) \i FILE execute commands from file \l list all databases \lo_export, \lo_import, \lo_list, \lo_unlink large object operations \o FILE send all query results to file or |pipe \p show the contents of the query buffer \pset NAME [VALUE] set table output option (NAME := {format|border|expanded|fieldsep|null|recordsep| tuples_only|title|tableattr|pager}) \q quit psql \qecho [STRING] write string to query output stream (see \o) \r reset (clear) the query buffer \s [FILE] display history or save it to file ^[[7m--More--^[[m \set [NAME [VALUE]] set internal variable, or list all if no parameters \t show only rows (currently off) \T [STRING] set HTML tag attributes, or unset if none \timing toggle timing of commands (currently off) \unset NAME unset (delete) internal variable \w [FILE] write query buffer to file \x toggle expanded output (currently off) \z [PATTERN] list table access privileges (same as \dp) \! [COMMAND] execute command in shell or start interactive shell cs424241=> \q [cs424241@nauseous ~]$