Received: from mail.retep.org.uk ([216.126.85.184]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0U9Beq99290; Tue, 30 Jan 2001 04:11:40 -0500 (EST) (envelope-from peter@retep.org.uk) Received: (from nobody@localhost) by mail.retep.org.uk (8.11.1/8.11.1) id f0U9BdE99285; Tue, 30 Jan 2001 04:11:39 -0500 (EST) (envelope-from peter@retep.org.uk) X-Authentication-Warning: mail.retep.org.uk: nobody set sender to peter@retep.org.uk using -f To: Wayne Johnson Subject: Re: Postgresql and JDBC Message-ID: <980845899.3a76854b0de35@webmail.retep.org.uk> Date: Tue, 30 Jan 2001 04:11:39 -0500 (EST) From: Peter T Mount Cc: pgsql-interfaces@postgresql.org, pgsql-jdbc@postgresql.org References: <20010129155347.25890.qmail@web2306.mail.yahoo.com> In-Reply-To: <20010129155347.25890.qmail@web2306.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.3 X-Archive-Number: 200101/317 X-Sequence-Number: 943 Quoting Wayne Johnson : > 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/