Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CC6B44761E8 for ; Tue, 3 Dec 2002 20:10:14 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 53C12474E42 for ; Tue, 3 Dec 2002 20:10:14 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 41CE343AF94; Tue, 3 Dec 2002 20:10:14 -0500 (EST) From: Jack Flak Subject: Re: dumb question: how to get a list of databases? X-Newsgroups: comp.databases.postgresql.admin References: <9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com> Lines: 57 Organization: not much User-Agent: KNode/0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Message-ID: X-Complaints-To: abuse@prodigy.net X-UserInfo1: FKPGG[SEQJTCRVT[EBCBNWX@RJ_XPDLMN@GZ_GYO^BVNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Date: Wed, 04 Dec 2002 01:09:42 GMT To: pgsql-admin@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/127 X-Sequence-Number: 6622 Thanks for the help! That worked just fine. I also found this (from within psql): # \l List of databases Database | Owner -----------+---------- template0 | postgres template1 | postgres testdb | postgres (3 rows) And this from command-line: $ /usr/local/pgsql/bin/psql -l Password: List of databases Database | Owner -----------+---------- template0 | postgres template1 | postgres testdb | postgres (3 rows) Thanks again! M.König wrote: > Jack Flak wrote in message > news:<9MEG9.2902$PK6.160071979@newssvr14.news.prodigy.com>... >> Greetings group, >> >> How do I get a list of current, existing databases (catalogs) for my >> current installation? >> >> Also: how do I find out my current version in linux? I ran this: >> >> /usr/local/pgsql/bin/psql --version >> >> and I got this: >> >> psql (PostgreSQL) 7.1 >> >> So it looks like I'm currently running 7.1. Is this the only way to >> find out? >> >> Thanks for your time. >> >> >> (Email address is invalid to prevent more spam) > you can use a simple sql to find it out. > > try: select datname from pg_database ; >