pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter T Mount <peter@retep.org.uk>
To: Wayne Johnson <wdtj@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Postgresql and JDBC
Date: Tue, 30 Jan 2001 04:11:39 -0500 (EST)
Message-ID: <980845899.3a76854b0de35@webmail.retep.org.uk> (raw)
In-Reply-To: <20010129155347.25890.qmail@web2306.mail.yahoo.com>
References: <20010129155347.25890.qmail@web2306.mail.yahoo.com>

Quoting Wayne Johnson <wdtj@yahoo.com>:

> I've got some questions on using POSTGRESQL with JDBC.  Some folks on
> the
> Novice mailing list suggested I use the interfaces mailing list, but
> the
> web site suggests that I should use another.  Which mailing list is
> appropriate.

pgsql-jdbc@postgresql.org - its a new list created due to the ammount of 
traffic.

I've got to update the jdbc pages this week.

> I would like to do a read & update of a single record.  I've seen
> several
> examples of using JDBC to update an entire table, but I'm only looking
> to
> modify a single record.

Standard SQL, ie UPDATE table SET col=value WHERE keycol=keyvalue;

Then use executeUpdate() from within Statement.

The basic example in the source included this.

> 
> Is this a case where I should use getCursorName?  How do I then do an
> UPDATE to only modify that single record?  Is this multi user safe? 

No, cursors are mainly used to manage large result sets.

> I've
> tried the JDBC 2.0 updateXXX functions, but they are apparently not
> implemented for Postgresql yet.

No. UpdateableResultSet is not yet available (partly done), and you can't 
guarantee it working on all ResultSet's anyhow (see the JDBC2.0 specs).

> 
> Are there any good (in depth) examples of JDBC out there?  The only
> ones
> I've seen are limited to a simple SELECT or UPDATE.

The source has some (src/interfaces/jdbc/example)

Peter

-- 
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/



view thread (5+ messages)  latest in thread

Message-ID: <980845899.3a76854b0de35@webmail.retep.org.uk>
Permalink:  ../980845899.3a76854b0de35@webmail.retep.org.uk/
Also on:    postgresql.org/message-id/980845899.3a76854b0de35@webmail.retep.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: peter@retep.org.uk, wdtj@yahoo.com, pgsql-jdbc@postgresql.org
  Subject: Re: Postgresql and JDBC
  In-Reply-To: <980845899.3a76854b0de35@webmail.retep.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox