gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] installing and using gnumed


From: Roberto Mello
Subject: Re: [Gnumed-devel] installing and using gnumed
Date: Sun, 2 Nov 2003 08:34:28 -0700
User-agent: Mutt/1.5.4i

On Sun, Nov 02, 2003 at 09:30:06AM +0100, Karsten Hilbert wrote:
> > Why? I didn't understand why it is a catch 22. 
> a) we can't redirect because the channel for the interactive
> question(s) (yes/no, passwords) seems to be the same as for
> the psql output for some reason
> b) we need redirection to capture all the output in order to
> have any hope of evaluating it (couldn't get Python to control
> psql via a pipe)

Ah, ok.
 
> > What I meant was a scenario like this:
> >
> > 1) User runs bootstrap script
> > 2) bootstrap script notices that things are already installed, at least
> >    partly 
> I'd be delighted to learn how to do that in SQL.

- connect to template1
- SELECT count(*) FROM pg_database WHERE datname = 'database_name here'

Or we could simply parse the output of psql -l

> > 3) bootstrap script asks user if s/he wants to DROP everything and start
> >    from scratch
> I'd be delighted to learn how to do that in SQL.
> 
> The one way I can think of would be to make the bootstrap
> script drop/rename the DATABASE it wants to install after
> asking for confirmation. Is that what people want ?

Precisely. Probably wise do ask twice.

-Roberto

-- 
+----|        Roberto Mello   -    http://www.brasileiro.net/  |------+
+       Computer Science Graduate Student, Utah State University      +
+       USU Free Software & GNU/Linux Club - http://fslc.usu.edu/     +
Reasons NOT to use MySQL:
"Generally speaking, all integrity problems that transactions solve can 
 be done with LOCK TABLES or atomic updates" 
     --Monty Widenius, MySQL author, in the MySQL manual




reply via email to

[Prev in Thread] Current Thread [Next in Thread]