Re: Syntax question - Mailing list pgsql-admin

From jseymour@linxnet.com (Jim Seymour)
Subject Re: Syntax question
Date
Msg-id 20040607214743.C37C4430E@jimsun.linxnet.com
Whole thread Raw
In response to Syntax question  ("Jeff Stout" <jstout@cctus.com>)
List pgsql-admin
"Jeff Stout" <jstout@cctus.com> wrote:
>
> I am fairly new to postgres, I need to know how to switch
> databases once I'm in a psql session. I can't seem to find the
> command for \h , maybe I just blind |-;

"\?" is your friend...

$ psql
Password:
Welcome to psql 7.4.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

jseymour=> \?
General
  \c[onnect] [DBNAME|- [USER]]
                 connect to new database (currently "jseymour")
[snip]

jseymour=> \l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 bookbiz   | jseymour | SQL_ASCII
 bookbiz2  | jseymour | SQL_ASCII
 jseymour  | jseymour | SQL_ASCII
 mydb      | jseymour | SQL_ASCII
[snip]
(12 rows)

jseymour=> \c mydb
You are now connected to database "mydb".
mydb=>

HTH,
Jim

pgsql-admin by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Syntax question
Next
From: Ray Ontko
Date:
Subject: Re: E-R Tool