X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C365D1B181 for ; Mon, 7 Jun 2004 18:47:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55874-04 for ; Mon, 7 Jun 2004 21:47:45 +0000 (GMT) Received: from jimsun.linxnet.com (jimsun.linxnet.com [64.32.196.134]) by svr1.postgresql.org (Postfix) with ESMTP id 83AAFD1B1F9 for ; Mon, 7 Jun 2004 18:47:41 -0300 (ADT) Received: by jimsun.linxnet.com (Postfix, from userid 332) id C37C4430E; Mon, 7 Jun 2004 17:47:43 -0400 (EDT) To: pgsql-admin@postgresql.org Subject: Re: Syntax question X-Sun-Charset: US-ASCII Reply-To: pgsql-admin@postgresql.org In-Reply-To: Message-Id: <20040607214743.C37C4430E@jimsun.linxnet.com> Date: Mon, 7 Jun 2004 17:47:43 -0400 (EDT) From: jseymour@linxnet.com (Jim Seymour) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/82 X-Sequence-Number: 13742 "Jeff Stout" 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