Re: list databases with SQL command

From: Richard Huxton <dev(at)archonet(dot)com>
To: David Teran <david(dot)teran(at)cluster9(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: list databases with SQL command
Date: 2005-01-18 11:21:59
Message-ID: 41ECF157.5080907@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Teran wrote:
> Hi,
>
> maybe its a silly question, but is there a way to list all databases
> with an SQL command? I know about the \l command from psql, but i wonder
> if such things are possible with SQL.

Look into the pg_class table or the information schema.
Also, if you start psql with -E then you can see how it executes all its
backslash commands.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Antony Paul 2005-01-18 12:59:33 What is xmin ?
Previous Message Peter Eisentraut 2005-01-18 11:13:52 Re: list databases with SQL command