Re: Getting a Database List

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Lee <lee(at)dev(dot)null(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting a Database List
Date: 2002-07-25 12:36:10
Message-ID: 20020725223610.H12000@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 25, 2002 at 10:55:04AM +0800, Lee wrote:
> I need to know the interactive SQL syntax to get a listing of databases on
> the current server.

psql -l

select * from pg_database; (IIRC)

> Using Informix, the commands would be:
> database sysmaster;
> select name from sysdatabases;
>
> MySQL:
> show databases;
>
> MS-SQL:
> SELECT name FROM master..sysdatabases ORDER BY name
>
> Please reply by posting to this newsgroup. My email address is hashed to
> protect me from spamming.

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Steffen 2002-07-25 12:37:15 select distinct error ?
Previous Message Bjoern Metzdorf 2002-07-25 12:35:20 Re: erserver