[Top][All Lists]

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

Re: [Gnumed-devel] Creating gnumed with sqls alone

From: Syan Tan
Subject: Re: [Gnumed-devel] Creating gnumed with sqls alone
Date: Tue, 10 Jan 2006 21:12:11 +0800

it is possible.

there is a line that executes a sql script within a sql script in gmDemographics-GIS-data.sql

\i gmCountryZones.sql  , 

which implies one is running the sql script in the same directory as execution,

and I moved that to the monolithic-core.conf  because  it means scripts which aren't configured

with the relative path to the sql scripts will still run.

I debugged



, which used to parse the

bootstrap conf files, but was now having problems,  mainly because of the \i gmCountryZones.sql

but also because I was forgetting to set the owner of gnumed as gm-dbo in "createdb " when

creating with postgres user.

This script will only run if   the pg_hba.conf allows  all users, including postgres, localhost md5 access,

and if  postgres user  has a known password that can be typed when doing psql -U postgres -h ....

, which usually one can't unless a "su postgres; psql template1 .... alter user postgres password "knownpass"; "

is done, and some people baulk at the idea of having a postgres user who has a known password, and that

can log in remotely, even from localhost.


The script doesn't set up audit triggers , which is in a python script in boostrap, but it probably could, but

for testing purposes, it doesn't. 


what the script does is basically parses server/boostrap/boostrap-monolithic-core.conf for the basic setup

information under $service ...$service  [database ..] [server..] [service SERVICENAME]  $schema ..$schema

orders it and puts the order in "filelist", and dumps the sql in that order  to a file called "all'  , does some  setup

using  the command line  createdb, createlang, createuser,  and then runs  psql -f  "all"  -U "gm-dbo" gnumed.

gnumed should be changed to gnumed_v2 if needed. Then it does the same for the country and test data.

So it sort of proves what Karsten asserts. 

On Tue Jan 10 8:17 , Richard Terry sent:


Not sure if you recieved my last email about functions.

Anway, is it possible to create gnumed entirely from the sql's in the sql
directory, as I am finding it continually impossible to use the scripts which
in my hands don't work.

It would be easy for me to manually create the users and groups, and then
iinstall the sql's in the correct order, however having tried that it.

The thing that mainly seems to be stopping me is an error:'relation
gm_schema_revision dosn't exist.

Any help appreciated, as now I'm getting up to speed with postgres I'm keen to
try and understand the gnumed database itself.



Gnumed-devel mailing list

reply via email to

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