Re: Help me start postmaster on a default installation of PostgreSQL.

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Lord Voldemort <murderthemuggles(at)yahoo(dot)co(dot)in>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Help me start postmaster on a default installation of PostgreSQL.
Date: 2011-07-07 13:34:34
Message-ID: 33621f5e49317e83d62d53b5c8637d96@mail.softperience.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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/

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Grace Batumbya 2011-07-12 16:10:56 PostgreSQL JDBC: bytea column getMetaData().getColumns().getIn("COLUMN_SIZE") ~ 2GB
Previous Message Craig Ringer 2011-07-07 12:04:33 Re: Help me start postmaster on a default installation of PostgreSQL.