Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Get a list of databases?



> 
> My code needs to be able to allow the user to select which
> database to connect to.
> 
> Is there a programmatic way to get a list of the databases
> managed by a pgsql server?
you mean like 'psql >\l' ?
try
select datname from pg_database;
-- 
joe speigle
www.sirfsup.com



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group