X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1C495D1BACD for ; Sat, 23 Aug 2003 23:04:50 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 90229-05 for ; Sat, 23 Aug 2003 23:04:22 -0300 (ADT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id E2273D1D291 for ; Sat, 23 Aug 2003 23:04:17 -0300 (ADT) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 41326; Sat, 23 Aug 2003 18:20:51 -0700 Message-ID: <3F481B62.1000303@joeconway.com> Date: Sat, 23 Aug 2003 18:56:50 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgmoscatt@optushome.com.au Cc: "\"PostgreSQL [INTERFACES] \" List" Subject: Re: Writing code to list Databases ? References: <1061690111.1917.1.camel@localhost> In-Reply-To: <1061690111.1917.1.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/58 X-Sequence-Number: 4412 Peter Moscatt wrote: > Are there routines that allow me to list databases within PostGres ? > From a shell prompt, use `psql -l`. The SQL command is: select datname from pg_database; HTH, Joe