From: Jerome Alet <alet@unice.fr>
To: Erle Czar Mantos <erle@hindang.msuiit.edu.ph>
Cc: D'laila Pereira <dpereira@students.uiuc.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: test the existence of a database
Date: Tue, 26 Feb 2002 09:40:50 +0100 (MET)
Message-ID: <Pine.LNX.3.96.1020226094012.24221A-100000@cortex.unice.fr> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0202261614510.1435-100000@hindang.msuiit.edu.ph>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: alet@unice.fr, erle@hindang.msuiit.edu.ph, dpereira@students.uiuc.edu
Subject: Re: test the existence of a database
In-Reply-To: <Pine.LNX.3.96.1020226094012.24221A-100000@cortex.unice.fr>
References: <Pine.LNX.4.33L2.0202261614510.1435-100000@hindang.msuiit.edu.ph> <Pine.LNX.3.96.1020226094012.24221A-100000@cortex.unice.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox