pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: Jasper Potts <jasper@squarepark.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Embedding Postgres in Java Application
Date: Sun, 16 Jan 2005 11:39:36 -0800
Message-ID: <41EAC2F8.1070502@hogranch.com> (raw)
In-Reply-To: <41EA9455.9000301@squarepark.com>
References: <41EA9455.9000301@squarepark.com>

Jasper Potts wrote:
> I am developing a desktop GUI application and am using postgres 8. I 
> need to be able to embed/bundle postgres with my application. To start 
> with I am releasing on windows with Linux and OSX later.
> 
> Is there a way of creating a JDBC connection to the db not over a 
> network socket?

not only does JDBC not support unix sockets, neither does Windows.


> The other way is going to be to start/stop the database from Java by 
> calling "pg_ctl start/stop". But that issues with this because of the 
> windows restrictions that postgres can't be run as a user with admin 
> privileges. Any Ideas?

I'd suggest your windows installer install postgres as a system service by 
cloning the operation of the standard windows installer for pgsql, and you use 
localhost for your database connections.   If you're using a java installer 
that doesn't understand windows services, maybe you could put it in a MSI 
(Microsoft Installer) wrapper that invokes both Postgres's MSI based 
installation and your java installer.




view thread (6+ messages)  latest in thread

Message-ID: <41EAC2F8.1070502@hogranch.com>
Permalink:  ../41EAC2F8.1070502@hogranch.com/
Also on:    postgresql.org/message-id/41EAC2F8.1070502@hogranch.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pierce@hogranch.com, jasper@squarepark.com
  Subject: Re: Embedding Postgres in Java Application
  In-Reply-To: <41EAC2F8.1070502@hogranch.com>
  References: <41EA9455.9000301@squarepark.com> <41EAC2F8.1070502@hogranch.com>

* 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