Creating Postgres DB from Remote Machine

From: "Dinesh Parikh" <dineshp(at)newgen(dot)co(dot)in>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Creating Postgres DB from Remote Machine
Date: 2001-11-28 11:10:58
Message-ID: 002901c177fd$5b983ee0$f005a8c0@dinesh
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2001-11-28 11:25:15 Re: Call for platform testing
Previous Message Lincoln Yeoh 2001-11-28 10:06:09 Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens up