Received: from cortex.unice.fr (cortex.unice.fr [134.59.53.1]) by postgresql.org (Postfix) with ESMTP id 00143475988 for ; Tue, 26 Feb 2002 03:41:10 -0500 (EST) Received: from localhost (jerome@localhost) by cortex.unice.fr (8.8.5/8.8.5) with SMTP id JAA24601; Tue, 26 Feb 2002 09:40:51 +0100 Date: Tue, 26 Feb 2002 09:40:50 +0100 (MET) From: Jerome Alet To: Erle Czar Mantos Cc: "D'laila Pereira" , pgsql-sql@postgresql.org Subject: Re: test the existence of a database In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/392 X-Sequence-Number: 6814 On Tue, 26 Feb 2002, Erle Czar Mantos wrote: > I do not see wat u r trying to mean? Do you want to test the > existence of a database from your code or from the standard shell? > If you want to test from your code, you can try connecting to > that database and if your connection is null, that means there > might be no database present. alternatively, you can connect to template1 dans do a : SELECT * FROM pg_database; hth. Jerome Alet - alet@unice.fr - http://cortex.unice.fr/~jerome Fac de Medecine de Nice http://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE