X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 516633A1D1D for ; Sun, 16 Jan 2005 19:39:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67005-03 for ; Sun, 16 Jan 2005 19:39:50 +0000 (GMT) Received: from hogranch.com (hogranch.com [66.117.128.240]) by svr1.postgresql.org (Postfix) with ESMTP id B01BC3A19D1 for ; Sun, 16 Jan 2005 19:39:49 +0000 (GMT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id j0GJdaf05811; Sun, 16 Jan 2005 11:39:36 -0800 Message-ID: <41EAC2F8.1070502@hogranch.com> Date: Sun, 16 Jan 2005 11:39:36 -0800 From: John R Pierce User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jasper Potts Cc: pgsql-jdbc@postgresql.org Subject: Re: Embedding Postgres in Java Application References: <41EA9455.9000301@squarepark.com> In-Reply-To: <41EA9455.9000301@squarepark.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/158 X-Sequence-Number: 12038 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.