Re: Listing databases

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: Doug Hall <doug_hall(at)aidt(dot)edu>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Listing databases
Date: 2004-05-05 21:59:44
Message-ID: BCBF2260.32500%awitney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


If you attach with psql then just use \l

Or this works as well

SELECT datname from pg_database;

> Sorry for the newbie question, but how do you get PostgreSQL to list
> the available databases? I know how to log into a certain database, but
> not list all of them. I know this must be possible because the
> phppgAdmin web site demonstrates it with their trial server.
>
> Thanks,
> Doug Hall
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-05-05 22:05:46 Re: Listing databases
Previous Message Alvaro Herrera 2004-05-05 21:58:23 Re: Listing databases