Received: from nh.newgen.co.in (203-195-148-19.now-india.net.in [203.195.148.19] (may be forged)) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB5CBsm72026 for ; Wed, 5 Dec 2001 07:11:55 -0500 (EST) (envelope-from dineshp@newgen.co.in) Received: from dinesh (ws240.newgen.co.in [192.168.5.240]) by nh.newgen.co.in (8.9.3/8.8.7) with SMTP id RAA30717 for ; Wed, 5 Dec 2001 17:40:46 +0530 Message-ID: <001501c17d85$5e93a020$f005a8c0@dinesh> From: "Dinesh Parikh" To: Subject: Fw: Creating Postgres DB from Remote Machine Date: Wed, 5 Dec 2001 17:37:11 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0012_01C17DB3.782D57A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200112/45 X-Sequence-Number: 5868 This is a multi-part message in MIME format. ------=_NextPart_000_0012_01C17DB3.782D57A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: Dinesh Parikh=20 To: pgsql-hackers@postgresql.org=20 Sent: Wednesday, November 28, 2001 4:40 PM Subject: Creating Postgres DB from Remote Machine Hi Everybody. I am writing an application in java and want to create a databse with busin= ess logic (In a lot of functions) remotely. For that purpose I would like t= o get some parameters from user. these are=20 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 =3D '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 app= lication to anyone than it may be not suitable to reinstall postgreSQL. Hel= p also says that that u have to put environment variable to avoid this erro= r. (using commands export/initlocation in same server process.).=20 But since I want to create DB remotely than How can i set environment varia= ble from different m/c (as m/c may be windows 95/98/NT and user not knows a= nything about telnet). I want to so all things from my application. Is there any different way to implement this.=20 Any suggestion(s) may help me. Regards Dinesh Parikh New Delhi ------=_NextPart_000_0012_01C17DB3.782D57A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
----- Original Message -----=20
From: Dinesh Pa= rikh=20
Sent: Wednesday, November 28, 2001 4:40 PM
Subject: Creating Postgres DB from Remote Machine

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