Re: Getting connected - Java application to PostgreSQL

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Peter Cook <ttpcook(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Getting connected - Java application to PostgreSQL
Date: 2005-09-15 05:47:58
Message-ID: 1126763278.26559.22.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 2005-09-15 at 11:37 +1000, Peter Cook wrote:
> Oliver,
>
> Thanks fro your reply, but I still feel none the wiser.
>
> How is the Postmaster started?

In Unix, by an init script at boot time. In Windows, it is normally a
service - I don't know any more about Windows since I don't use it.

> I have done nothing to start it, or put it in the boot sequence. This may
> have happen as part of installation; I have no idea.

If you are using a package such as for Debian or Red Hat, it is part of
the installation of the server package. If you build PostgreSQL
yourself, it is up to you to install an appropriate init script. I
suppose the Windows package has something to start the service. If you
need advice about Windows, ask the list.

> Are you saying that the Postmaster must be running in order for me to log in
> to pgAdmin? That would imply that the Postmaster is started as PgAdmin is
> fired up.

No. The postmaster is running all the time, from boot. It waits all
the time for clients to connect to it. pgadmin is a client and can be
running without connecting to any server (after all, you can't tell it
where to connect to until it is running.) It can be on a completely
different machine. If you tell it to connect to somewhere that has no
postmaster running, the connection will fail.

> What are the other bits I need to have in place?
> What changes do I need to make to the Java application to change from using
> an Access database to using a postgreSQL database.

You need to tell it to connect to a different host and/or port. Again,
I have never used Java or JDBC, so you need to ask the list for any more
details if that doesn't help you.

> A driver needs to be loaded, and a connection has to be made using a URL.
>
> Your sincerely
>
> Peter Cook
>
>
> >From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
> >Reply-To: olly(at)lfix(dot)co(dot)uk
> >To: Peter Cook <petercook69(at)bigpond(dot)com>
> >CC: pgsql-novice(at)postgresql(dot)org, ttpcook(at)hotmail(dot)com
> >Subject: Re: [NOVICE] Getting connected - Java application to PostgreSQL
> >Date: Tue, 13 Sep 2005 09:08:01 +0100
> >
> >On Tue, 2005-09-13 at 12:11 +1000, Peter Cook wrote:
> >...
> > > I see the Postmaster needs to be running. Does that happen when you
> > > start the pgAdmin application from the Start menu?
> >
> >pgadmin is a client application like any other and need not be running
> >on the same machine as the postmaster.
> >
> >The postmaster is started, usually at boot time, on the server. It must
> >already be running when you try to connect to it with pgadmin.
> >
> >--
> >Oliver Elphick olly(at)lfix(dot)co(dot)uk
> >Isle of Wight http://www.lfix.co.uk/oliver
> >GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
> > ========================================
> > Do you want to know God? http://www.lfix.co.uk/knowing_god.html
> >
>
> _________________________________________________________________
> SEEK: Over 80,000 jobs across all industries at Australia's #1 job site.
> http://ninemsn.seek.com.au?hotmail
>
--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html

Browse pgsql-novice by date

  From Date Subject
Next Message george young 2005-09-15 17:30:13 Re: How to do mass upload
Previous Message Srinivas Iyyer 2005-09-14 22:36:27 How to do mass upload