From: Mark Fenbers <Mark.Fenbers@noaa.gov>
To: pgsql-sql@postgresql.org
Subject: Does PG have a database
Date: Mon, 22 May 2006 12:28:41 -0400
Message-ID: <4471E6B9.9080002@noaa.gov> (raw)
I have working PostgreSQL databases on 3 of my ~30 Linux boxes. I want
my software to be able to determine which of my 30 boxes have functional
databases on them. Since Pg is part of the baseline distro, merely
checking for the existence of an executable doesn't solve my problem.
I tried looping through my list of hosts and running the command:
psql -h $host --list
but this fails on a box with a database with the same error code as on a
box that doesn't have a database, if my PGUSER isn't set and my login ID
is not the username of the database. The PGUSER setting might differ
for each host, so specifying this in the software is not practical.
Bottom line: What trick can I use to determine whether a box has a
living, breathing Pg database if I don't know the DB owner?
Mark
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: Mark.Fenbers@noaa.gov
Subject: Re: Does PG have a database
In-Reply-To: <4471E6B9.9080002@noaa.gov>
* 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