Index: src/interfaces/jdbc/org/postgresql/Driver.java.in =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/Driver.java.in,v retrieving revision 1.30 diff -c -r1.30 Driver.java.in *** src/interfaces/jdbc/org/postgresql/Driver.java.in 29 May 2003 04:39:51 -0000 1.30 --- src/interfaces/jdbc/org/postgresql/Driver.java.in 29 Jun 2003 11:15:53 -0000 *************** *** 272,277 **** --- 272,288 ---- l_urlArgs = url.substring(l_qPos+1); } + // look for an IPv6 address that is enclosed by [] + // the upcoming parsing that uses colons as identifiers can't handle + // the colons in an IPv6 address. + int ipv6start = l_urlServer.indexOf("["); + int ipv6end = l_urlServer.indexOf("]"); + String ipv6address = null; + if (ipv6start != -1 && ipv6end > ipv6start) { + ipv6address = l_urlServer.substring(ipv6start+1,ipv6end); + l_urlServer = l_urlServer.substring(0,ipv6start)+"ipv6host"+l_urlServer.substring(ipv6end+1); + } + //parse the server part of the url StringTokenizer st = new StringTokenizer(l_urlServer, ":/", true); for (int count = 0; (st.hasMoreTokens()); count++) *************** *** 345,350 **** --- 356,365 ---- } } } + + // if we extracted an IPv6 address out earlier put it back + if (ipv6address != null) + urlProps.put("PGHOST",ipv6address); //parse the args part of the url StringTokenizer qst = new StringTokenizer(l_urlArgs, "&"); Index: doc/src/sgml/jdbc.sgml =================================================================== RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/jdbc.sgml,v retrieving revision 1.44 diff -c -r1.44 jdbc.sgml *** doc/src/sgml/jdbc.sgml 7 Apr 2003 01:29:25 -0000 1.44 --- doc/src/sgml/jdbc.sgml 29 Jun 2003 11:15:54 -0000 *************** *** 33,39 **** This section describes the steps you need to take before you can ! write or run programs that use the JDBC interface. --- 33,39 ---- This section describes the steps you need to take before you can ! write or run programs that use the JDBC interface. *************** *** 49,63 **** 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 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. --- 49,65 ---- 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 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 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,78 **** 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 java command line. --- 69,80 ---- To use the driver, the JAR archive (named postgresql.jar if you built from source, otherwise ! 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,87 **** JDBC driver to access a database, and that application is installed as /usr/local/lib/myapp.jar. The PostgreSQL ! JDBC driver installed as /usr/local/pgsql/share/java/postgresql.jar. To run the application, we would use: --- 83,89 ---- JDBC driver to access a database, and that application is installed as /usr/local/lib/myapp.jar. The PostgreSQL ! JDBC driver installed as /usr/local/pgsql/share/java/postgresql.jar. To run the application, we would use: *************** *** 113,120 **** 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. --- 115,123 ---- 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. *************** *** 123,130 **** Initializing the Driver ! This section describes how to load and initialize the JDBC driver ! in your programs. --- 126,133 ---- Initializing the Driver ! This section describes how to load and initialize the JDBC ! driver in your programs. *************** *** 252,258 **** ! The host name of the server. Defaults to localhost. --- 255,264 ---- ! 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,466 **** - - - 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. - - --- 457,462 ---- *************** *** 606,616 **** contains some examples on ! how to process binary data using the PostgreSQL JDBC driver. ! Processing Binary Data in JDBC For example, suppose you have a table containing the file names of --- 602,612 ---- contains some examples on ! how to process binary data using the PostgreSQL JDBC driver. ! Processing Binary Data in <acronym>JDBC</> For example, suppose you have a table containing the file names of *************** *** 2490,2501 **** Connection Pools and Data Sources ! 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 JDK 1.3.x in combination with the JDBC 2.0 Optional Package (JDBC 2), or with JDK 1.4 or higher --- 2486,2498 ---- Connection Pools and Data Sources ! 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 JDK 1.3.x in combination with the JDBC 2.0 Optional Package (JDBC 2), or with JDK 1.4 or higher *************** *** 2510,2516 **** Overview ! 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 --- 2507,2513 ---- Overview ! 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