pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSyntax question
4+ messages / 4 participants
[nested] [flat]
* Syntax question
@ 2004-06-07 21:18 Jeff Stout <jstout@cctus.com>
2004-06-07 21:35 ` Re: Syntax question Scott Marlowe <smarlowe@qwest.net>
2004-06-07 21:47 ` Re: Syntax question Jim Seymour <jseymour@linxnet.com>
2004-06-07 22:28 ` Re: Syntax question Andrew Biagioni <andrew.biagioni@e-greek.net>
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Stout @ 2004-06-07 21:18 UTC (permalink / raw)
To: pgsql-admin
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 |-;
Thank you in advance
Jeff Stout
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Syntax question
2004-06-07 21:18 Syntax question Jeff Stout <jstout@cctus.com>
@ 2004-06-07 21:35 ` Scott Marlowe <smarlowe@qwest.net>
2 siblings, 0 replies; 4+ messages in thread
From: Scott Marlowe @ 2004-06-07 21:35 UTC (permalink / raw)
To: Jeff Stout <jstout@cctus.com>; +Cc: pgsql-admin
On Mon, 2004-06-07 at 15:18, 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 |-;
\c database
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Syntax question
2004-06-07 21:18 Syntax question Jeff Stout <jstout@cctus.com>
@ 2004-06-07 21:47 ` Jim Seymour <jseymour@linxnet.com>
2 siblings, 0 replies; 4+ messages in thread
From: jseymour@linxnet.com @ 2004-06-07 21:47 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Syntax question
2004-06-07 21:18 Syntax question Jeff Stout <jstout@cctus.com>
@ 2004-06-07 22:28 ` Andrew Biagioni <andrew.biagioni@e-greek.net>
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Biagioni @ 2004-06-07 22:28 UTC (permalink / raw)
To: Jeff Stout <jstout@cctus.com>; +Cc: pgsql-admin
Jeff,
you need to look under "\?" (psql commands), not "\h" (SQL commands).
Anyway, what you need is:
\c[onnect] [DBNAME|- [USER]]
connect to new database (currently "[...]")
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 |-;
>
> Thank you in advance
>
> Jeff Stout
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-06-07 22:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-07 21:18 Syntax question Jeff Stout <jstout@cctus.com>
2004-06-07 21:35 ` Scott Marlowe <smarlowe@qwest.net>
2004-06-07 21:47 ` Jim Seymour <jseymour@linxnet.com>
2004-06-07 22:28 ` Andrew Biagioni <andrew.biagioni@e-greek.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox