Hi Everybody.
I am writing an application in java and want to create a databse with business logic (In a lot of functions) remotely. For that purpose I would like to get some parameters from user. these are 


1. Database Name (e.g. anaconda)
2. Super user (e.g. postgres)
3. Super user passwd. (e.g. postgres)
4. Server IP (e.g 192.168.5.127)
5. Server port (Default 5432).
6. Datapath(e.g. /usr/local/Mydata)

I am connecting to template1 using postgres-jdbc interface. I am using sql command Create Database. When I am giving command as follows

Create database anaconda With Location = 'usr/local/Mydata'

It gives error that absolute path is not allowed.
Postgres Help says that to allow absolute path u have to install postgreSQL with some gamke option but it is security risk. If I want to give this application to anyone than it may be not suitable to reinstall postgreSQL. Help also says that that u have to put environment variable to avoid this error. (using commands export/initlocation in same server process.). 
But since I want to create DB remotely than How can i set environment variable from different m/c (as m/c may be windows 95/98/NT and user not knows anything about telnet). I want to so all things from my application.

Is there any different way to implement this. 
Any suggestion(s) may help me.

Regards
Dinesh Parikh
New Delhi







Hi Everybody.
I am writing an application in java and want to 
create a databse with business logic (In a lot of functions) remotely. For that 
purpose I would like to get some parameters from user. these are 
 
 
1. Database Name (e.g. 
anaconda)
2. Super user (e.g. 
postgres)
3. Super user passwd. 
(e.g. postgres)
4. Server IP (e.g 
192.168.5.127)
5. Server port (Default 
5432).
6. Datapath(e.g. 
/usr/local/Mydata)
 
I am connecting to template1 using postgres-jdbc 
interface. I am using sql command Create 
Database. When I am giving command as 
follows
 
Create database anaconda 
With Location = 'usr/local/Mydata'
 
It gives error that absolute path is not 
allowed.
Postgres Help says that to allow absolute path u 
have to install postgreSQL with some gamke option but it is security risk. If I 
want to give this application to anyone than it may be not suitable to reinstall 
postgreSQL. Help also says that that u have to put environment variable to avoid 
this error. (using commands export/initlocation in same server 
process.). 
But since I want to create DB remotely than 
How can i set environment variable from different m/c (as m/c may be windows 
95/98/NT and user not knows anything about telnet). I want to so all things from 
my application.
 
Is there any different way to implement this. 

Any suggestion(s) may help me.
 
Regards
Dinesh Parikh
New Delhi
Wed, 28 Nov 2001 16:40:58 +0530
"Dinesh Parikh" <dineshp@newgen.co.in>
Creating Postgres DB from Remote Machine