Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0AE5BB5DBDA for ; Thu, 7 Jul 2011 10:34:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 71274-02 for ; Thu, 7 Jul 2011 13:34:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.intergenia.de [217.118.26.141]) by mail.postgresql.org (Postfix) with ESMTP id 861ABB5DBCA for ; Thu, 7 Jul 2011 10:34:28 -0300 (ADT) Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.intergenia.de [217.118.26.141]) by mail.softperience.eu (Postfix) with ESMTPA id 3148FC00079; Thu, 7 Jul 2011 15:34:34 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 07 Jul 2011 15:34:34 +0200 From: =?UTF-8?Q?Rados=C5=82aw_Smogura?= To: Craig Ringer Cc: Lord Voldemort , Subject: Re: Help me start postmaster on a default installation of PostgreSQL. In-Reply-To: <4E15A0D1.2040706@postnewspapers.com.au> References: "<4E143A4F.50104@yahoo.co.in>" <4E1450C9020000250003F047@gw.wicourts.gov> <4E158C26.3090305@yahoo.co.in> <4E15A0D1.2040706@postnewspapers.com.au> Message-ID: <33621f5e49317e83d62d53b5c8637d96@mail.softperience.eu> X-Sender: rsmogura@softperience.eu User-Agent: Roundcube Webmail/0.5.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DOS_RCVD_IP_TWICE_B=0.001 X-Spam-Level: X-Archive-Number: 201107/14 X-Sequence-Number: 22018 On Thu, 07 Jul 2011 20:04:33 +0800, Craig Ringer wrote: > 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. ...and for more advanced tasks use urlclassloader, refer to JavaDoc. Regards, Radek > -- > 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/