Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6D8FAB5DBE5 for ; Thu, 7 Jul 2011 09:04:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 39034-03 for ; Thu, 7 Jul 2011 12:04:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id F2FE5B5DBCA for ; Thu, 7 Jul 2011 09:04:43 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 7F7D937; Thu, 7 Jul 2011 08:04:43 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GekadnP6pE-2; Thu, 7 Jul 2011 08:04:42 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 9395827; Thu, 7 Jul 2011 08:04:42 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 8F3E3AF0CD; Thu, 7 Jul 2011 20:04:41 +0800 (WST) X-Amavis-Modified: Mail body modified (using disclaimer) - mail.postnewspapers.com.au X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IHAjoG3dzr43; Thu, 7 Jul 2011 20:04:36 +0800 (WST) Received: from [10.1.1.7] (124-169-57-156.dyn.iinet.net.au [124.169.57.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 8EDB4AE805; Thu, 7 Jul 2011 20:04:36 +0800 (WST) Message-ID: <4E15A0D1.2040706@postnewspapers.com.au> Date: Thu, 07 Jul 2011 20:04:33 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Lord Voldemort CC: pgsql-jdbc@postgresql.org Subject: Re: Help me start postmaster on a default installation of PostgreSQL. References: <4E143A4F.50104@yahoo.co.in> <4E1450C9020000250003F047@gw.wicourts.gov> <4E158C26.3090305@yahoo.co.in> In-Reply-To: <4E158C26.3090305@yahoo.co.in> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/13 X-Sequence-Number: 22017 On 7/07/2011 6:36 PM, Lord Voldemort wrote: > I've sorted out things myself. > > Firstly IMHO this list is the appropriate place for my query as you'd > see that what I really want is to use JDBC with PostgreSQL. Running > postmaster was supposed to be a way to accomplish that. > > But as it turns out, newer versions of PostgreSQL have done away with > postmaster completely. Say what? No, there's still a postmaster. You wouldn't ever be invoking it directly, though; you use pg_ctl to control PostgreSQL if you installed from source or from the EnterpriseDB packages. For distro packages of PostgreSQL you use your distro's service management mechanism: the "service" command, /etc/init.d/ scripts, etc. If you're using distro packages of PostgreSQL, stick to the distro's management methods. > After default installation nothing needs to be > changed. Services necessary for backend database access are started > automatically at boot-up. Note that PostgreSQL probably only listens on 127.0.0.1 or it may have TCP/IP disabled so it only uses UNIX sockets. You may need to alter postgresql.conf if you want to listen on other interfaces. > After installing libpg-java (that's the JDBC > driver package for postgreSQL) all that needs to be done is to add > /usr/share/java/postgresql.jar to the java library. I use NetBeans so > that was easy for me. I don't know how to do that when running > applications from command line using "java /classname/" though. Use the -classpath argument to the JVM. Typically, though, you bundle the PostgreSQL JDBC driver within your executable JAR and run it with "java -jar myapp.jar", using a Main-class: entry in META-INF/MANIFEST.MF to tell Java what the entry point class is. This is all basic Java stuff and has nothing to do with PostgreSQL, though. -- Craig Ringer POST Newspapers 276 Onslow Rd, Shenton Park Ph: 08 9381 3088 Fax: 08 9388 2258 ABN: 50 008 917 717 http://www.postnewspapers.com.au/