diff --git a/doc/src/sgml/jdbc.sgml b/doc/src/sgml/jdbc.sgml index 525cc07175ded378fccc1a4e70149f6bfbe5b62f..7170aedccf63d7a145b41dedf157380e1d499be8 100644 --- a/doc/src/sgml/jdbc.sgml +++ b/doc/src/sgml/jdbc.sgml @@ -1,5 +1,5 @@ @@ -33,7 +33,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25 This section describes the steps you need to take before you can - write or run programs that use the JDBC interface. + write or run programs that use the JDBC interface. @@ -49,15 +49,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25 Alternatively you can build the driver from source, but you should only need to do this if you are making changes to the source code. - For details, refer to the PostgreSQL installation - instructions. After installation, the driver should be found in + For details, refer to the PostgreSQL + installation instructions. + After installation, the driver should be found in PREFIX/share/java/postgresql.jar. The resulting driver will be built for the version of Java you are running. If you build with a 1.1 JDK you will build a - version that supports the JDBC 1 specification, if you build with - a Java 2 JDK (e.g., JDK 1.2 or - JDK 1.3) you will build a version that supports the - JDBC 2 specification. + version that supports the JDBC 1 specification, if you build + with a 1.2 or 1.3 JDK you will build a version that supports + the JDBC 2 specification, and finally if you build with a + 1.4 JDK you will build a version that supports the + JDBC 3 specification. @@ -67,12 +69,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25 To use the driver, the JAR archive (named postgresql.jar if you built from source, otherwise - it will likely be named jdbc&majorversion;-1.1.jar or - jdbc&majorversion;-1.2.jar for the JDBC 1 and JDBC 2 versions - respectively) - needs to be included in the - class path, either by putting it in the CLASSPATH - environment variable, or by using flags on the + it will likely be named pg&majorversion;jdbc1.jar, + pg&majorversion;jdbc2.jar, or + pg&majorversion;jdbc3.jar for the JDBC 1, + JDBC 2, and JDBC 3 versions respectively) + needs to be included in the class path, either by putting it in the + CLASSPATH environment variable, or by using flags on the java command line. @@ -81,7 +83,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25 JDBC driver to access a database, and that application is installed as /usr/local/lib/myapp.jar. The PostgreSQL - JDBC driver installed as + JDBC driver installed as /usr/local/pgsql/share/java/postgresql.jar. To run the application, we would use: @@ -113,8 +115,9 @@ java MyApp Also, the client authentication setup in the pg_hba.conf file may need to be configured. Refer to for details. The - JDBC driver supports the trust, ident, - password, md5, and crypt authentication methods. + JDBC driver supports the trust, + ident, password, md5, and + crypt authentication methods. @@ -123,8 +126,8 @@ java MyApp Initializing the Driver - This section describes how to load and initialize the JDBC driver - in your programs. + This section describes how to load and initialize the JDBC + driver in your programs. @@ -252,7 +255,10 @@ jdbc:postgresql://host: - The host name of the server. Defaults to localhost. + The host name of the server. Defaults to localhost. To specify an IPv6 address your must enclose the host parameter with square brackets, for example: + +jdbc:postgresql://[::1]:5740/accounting + @@ -451,16 +457,6 @@ st.close(); - - - ResultSet is currently read only. - You can not update data through the ResultSet. - If you want to update data you need to do it the normal way - by using the SQL statement UPDATE. This is - in conformance with the JDBC specification - which does not require drivers to provide updatable result sets. - - @@ -606,11 +602,11 @@ st.close(); contains some examples on - how to process binary data using the PostgreSQL JDBC driver. + how to process binary data using the PostgreSQL JDBC driver. - Processing Binary Data in JDBC + Processing Binary Data in <acronym>JDBC</> For example, suppose you have a table containing the file names of @@ -2490,12 +2486,13 @@ public void unlink(int oid) throws SQLException Connection Pools and Data Sources - JDBC 2 introduced standard connection pooling features in an - add-on API known as the JDBC 2.0 Optional + JDBC 2 introduced standard connection pooling features in an + add-on API known as the JDBC 2.0 Optional Package (also known as the JDBC 2.0 Standard Extension). These features have since been included in - the core JDBC 3 API. The PostgreSQL - JDBC drivers support these features if it has been compiled with + the core JDBC 3 API. The + PostgreSQL JDBC drivers + support these features if it has been compiled with JDK 1.3.x in combination with the JDBC 2.0 Optional Package (JDBC 2), or with JDK 1.4 or higher @@ -2510,7 +2507,7 @@ public void unlink(int oid) throws SQLException Overview - The JDBC API provides a client + The JDBC API provides a client and a server interface for connection pooling. The client interface is javax.sql.DataSource, which is what application code will typically use to