database information

Started by Peter Choeover 24 years ago4 messagesgeneral
Jump to latest
#1Peter Choe
choepete@mindspring.com

how do i get the names of the databases that are created in postgres?

is there a select statement similar to oracle?

peter choe

#2Ryan Mahoney
ryan@paymentalliance.net
In reply to: Peter Choe (#1)
Re: database information

SELECT datname FROM pg_database WHERE datname NOT LIKE 'template_';

-r

At 04:22 PM 7/30/01 -0400, Peter Choe wrote:

Show quoted text

how do i get the names of the databases that are created in postgres?

is there a select statement similar to oracle?

peter choe

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01

#3Noname
newsreader@mediaone.net
In reply to: Peter Choe (#1)
Re: database information

\l

will do

Show quoted text

On Mon, Jul 30, 2001 at 04:22:24PM -0400, Peter Choe wrote:

how do i get the names of the databases that are created in postgres?

is there a select statement similar to oracle?

peter choe

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#4Lee Harr
missive@frontiernet.net
In reply to: Peter Choe (#1)
Re: database information

On Mon, 30 Jul 2001 20:28:32 +0000 (UTC), Peter Choe <choepete@mindspring.com>:

how do i get the names of the databases that are created in postgres?

From psql:

\l

(also, see \? for additional handy tools)

or, from your shell:

psql -l