X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BFA4E3A455F for ; Mon, 1 Nov 2004 12:27:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04364-07 for ; Mon, 1 Nov 2004 12:26:54 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by svr1.postgresql.org (Postfix) with ESMTP id BA4D13A4539 for ; Mon, 1 Nov 2004 12:26:56 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id 77so155756rnk for ; Mon, 01 Nov 2004 04:26:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=IBlCKWlTGijEk535+HUWy7zXS3FbkTCRrwFqr2Rmke0CYKvck1KHBKiIzR7vy3ULke82XER1RYRRXNhZq/Ek2I7TqIvOMaPGIDfG10lQPPmM+fStHrS+T04F4VdSVJJhhoO1MQfD12m++gzjjRHiOnSg8PwU4Hh/IrgzT8K6OiE= Received: by 10.38.66.42 with SMTP id o42mr698495rna; Mon, 01 Nov 2004 04:26:56 -0800 (PST) Received: by 10.38.78.38 with HTTP; Mon, 1 Nov 2004 04:26:56 -0800 (PST) Message-ID: <1d581afe041101042611fd649c@mail.gmail.com> Date: Mon, 1 Nov 2004 13:26:56 +0100 From: Ian Barwick Reply-To: Ian Barwick To: Erik Wasser Subject: Re: 'show databases' in psql way? Cc: pgsql-sql@postgresql.org In-Reply-To: <200411011313.10872.erik.wasser@iquer.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200411011313.10872.erik.wasser@iquer.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/5 X-Sequence-Number: 19324 On Mon, 1 Nov 2004 13:13:10 +0100, Erik Wasser wrote: > Hi list, > > how can I list the databases in a postgresish way? I know about the '-l' > switch of 'psql' but is there a DBI/SQL-query way? I don't want to call > an external program only to list the databases. I've googled about this > problem but I only found the '-l'-way to this this. > > Ideas? Solutions? Start psql with the -E switch, and it shows the SQL used to generate the output from psql's slash commands. Ian Barwick barwick@gmail.com