pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dinesh Parikh <dineshp@newgen.co.in>
To: pgsql-sql@postgresql.org
Subject: Fw: Creating Postgres DB from Remote Machine
Date: Wed, 5 Dec 2001 17:37:11 +0530
Message-ID: <001501c17d85$5e93a020$f005a8c0@dinesh> (raw)


----- Original Message ----- 
From: Dinesh Parikh 
To: pgsql-hackers@postgresql.org 
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 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

Message-ID: <001501c17d85$5e93a020$f005a8c0@dinesh>
Permalink:  ../001501c17d85$5e93a020$f005a8c0@dinesh/
Also on:    postgresql.org/message-id/001501c17d85$5e93a020$f005a8c0@dinesh

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dineshp@newgen.co.in
  Subject: Re: Fw: Creating Postgres DB from Remote Machine
  In-Reply-To: <001501c17d85$5e93a020$f005a8c0@dinesh>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox