Обсуждение: database information

Поиск
Список
Период
Сортировка

database information

От
Peter Choe
Дата:
how do i get the names of the databases that are created in postgres?

is there a select statement similar to oracle?

peter choe

Re: database information

От
Ryan Mahoney
Дата:
SELECT datname FROM pg_database WHERE datname NOT LIKE 'template_';

-r


At 04:22 PM 7/30/01 -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
>
>
>
>---
>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

---
Outgoing 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

Re: database information

От
newsreader@mediaone.net
Дата:
\l

will do

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

Re: database information

От
missive@frontiernet.net (Lee Harr)
Дата:
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