Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3cac5a

Browse files
author
Barry Lind
committed
Minor jdbc doc updates submitted by Kris Jurka
Modified Files: sgml/jdbc.sgml
1 parent9af05a9 commita3cac5a

File tree

1 file changed

+34
-37
lines changed

1 file changed

+34
-37
lines changed

‎doc/src/sgml/jdbc.sgml

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.45 2003/06/30 16:39:42 barry Exp $
33
-->
44

55
<chapter id="jdbc">
@@ -33,7 +33,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25
3333

3434
<para>
3535
This section describes the steps you need to take before you can
36-
write or run programs that use the JDBC interface.
36+
write or run programs that use the<acronym>JDBC</> interface.
3737
</para>
3838

3939
<sect2 id="jdbc-build">
@@ -49,15 +49,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25
4949
<para>
5050
Alternatively you can build the driver from source, but you should
5151
only need to do this if you are making changes to the source code.
52-
For details, refer to the <productname>PostgreSQL</> installation
53-
instructions. After installation, the driver should be found in
52+
For details, refer to the <productname>PostgreSQL</>
53+
<link linkend="installation">installation instructions</link>.
54+
After installation, the driver should be found in
5455
<filename><replaceable>PREFIX</>/share/java/postgresql.jar</filename>.
5556
The resulting driver will be built for the version of Java you are
5657
running. If you build with a 1.1 <acronym>JDK</> you will build a
57-
version that supports the JDBC 1 specification, if you build with
58-
a Java 2 <acronym>JDK</> (e.g., <acronym>JDK</> 1.2 or
59-
<acronym>JDK</> 1.3) you will build a version that supports the
60-
JDBC 2 specification.
58+
version that supports the <acronym>JDBC</> 1 specification, if you build
59+
with a 1.2 or 1.3 <acronym>JDK</> you will build a version that supports
60+
the <acronym>JDBC</> 2 specification, and finally if you build with a
61+
1.4 <acronym>JDK</acronym> you will build a version that supports the
62+
<acronym>JDBC</> 3 specification.
6163
</para>
6264
</sect2>
6365

@@ -67,12 +69,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25
6769
<para>
6870
To use the driver, the JAR archive (named
6971
<filename>postgresql.jar</filename> if you built from source, otherwise
70-
it will likely be named <filename>jdbc&majorversion;-1.1.jar</filename> or
71-
<filename>jdbc&majorversion;-1.2.jar</filename> for the JDBC 1 and JDBC 2 versions
72-
respectively)
73-
needs to be included in the
74-
class path, either by putting it in the <envar>CLASSPATH</envar>
75-
environment variable, or by using flags on the
72+
it will likely be named <filename>pg&majorversion;jdbc1.jar</filename>,
73+
<filename>pg&majorversion;jdbc2.jar</filename>, or
74+
<filename>pg&majorversion;jdbc3.jar</filename> for the <acronym>JDBC</> 1,
75+
<acronym>JDBC</> 2, and <acronym>JDBC</> 3 versions respectively)
76+
needs to be included in theclass path, either by putting it in the
77+
<envar>CLASSPATH</envar>environment variable, or by using flags on the
7678
<command>java</command> command line.
7779
</para>
7880

@@ -81,7 +83,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.44 2003/04/07 01:29:25
8183
<acronym>JDBC</acronym> driver to access a database, and that
8284
application is installed as
8385
<filename>/usr/local/lib/myapp.jar</filename>. The PostgreSQL
84-
JDBC driver installed as
86+
<acronym>JDBC</> driver installed as
8587
<filename>/usr/local/pgsql/share/java/postgresql.jar</>. To run
8688
the application, we would use:
8789
<programlisting>
@@ -113,8 +115,9 @@ java MyApp
113115
Also, the client authentication setup in the
114116
<filename>pg_hba.conf</filename> file may need to be configured.
115117
Refer to <xref linkend="client-authentication"> for details. The
116-
<acronym>JDBC</acronym> driver supports the trust, ident,
117-
password, md5, and crypt authentication methods.
118+
<acronym>JDBC</acronym> driver supports the <literal>trust</>,
119+
<literal>ident</>, <literal>password</>, <literal>md5</>, and
120+
<literal>crypt</> authentication methods.
118121
</para>
119122
</sect2>
120123
</sect1>
@@ -123,8 +126,8 @@ java MyApp
123126
<title>Initializing the Driver</title>
124127

125128
<para>
126-
This section describes how to load and initialize the JDBC driver
127-
in your programs.
129+
This section describes how to load and initialize the<acronym>JDBC</>
130+
driverin your programs.
128131
</para>
129132

130133
<sect2 id="jdbc-import">
@@ -252,7 +255,10 @@ jdbc:postgresql://<replaceable class="parameter">host</replaceable>:<replaceable
252255
</term>
253256
<listitem>
254257
<para>
255-
The host name of the server. Defaults to <literal>localhost</literal>.
258+
The host name of the server. Defaults to <literal>localhost</literal>. To specify an IPv6 address your must enclose the <replaceable class="parameter">host</replaceable> parameter with square brackets, for example:
259+
<programlisting>
260+
jdbc:postgresql://[::1]:5740/accounting
261+
</programlisting>
256262
</para>
257263
</listitem>
258264
</varlistentry>
@@ -451,16 +457,6 @@ st.close();
451457
</para>
452458
</listitem>
453459

454-
<listitem>
455-
<para>
456-
<classname>ResultSet</classname> is currently read only.
457-
You can not update data through the <classname>ResultSet</classname>.
458-
If you want to update data you need to do it the normal way
459-
by using the <acronym>SQL</acronym> statement <command>UPDATE</command>. This is
460-
in conformance with the <acronym>JDBC</acronym> specification
461-
which does not require drivers to provide updatable result sets.
462-
</para>
463-
</listitem>
464460
</itemizedlist>
465461
</para>
466462
</sect2>
@@ -606,11 +602,11 @@ st.close();
606602

607603
<para>
608604
<xref linkend="jdbc-binary-data-example"> contains some examples on
609-
how to process binary data using the PostgreSQL JDBC driver.
605+
how to process binary data using the PostgreSQL<acronym>JDBC</> driver.
610606
</para>
611607

612608
<example id="jdbc-binary-data-example">
613-
<title>Processing Binary Data in JDBC</title>
609+
<title>Processing Binary Data in<acronym>JDBC</></title>
614610

615611
<para>
616612
For example, suppose you have a table containing the file names of
@@ -2490,12 +2486,13 @@ public void unlink(int oid) throws SQLException
24902486
<title>Connection Pools and Data Sources</title>
24912487

24922488
<para>
2493-
JDBC 2 introduced standard connection pooling features in an
2494-
add-on API known as the <acronym>JDBC</acronym> 2.0 Optional
2489+
<acronym>JDBC</> 2 introduced standard connection pooling features in an
2490+
add-on<acronym>API</> known as the <acronym>JDBC</acronym> 2.0 Optional
24952491
Package (also known as the <acronym>JDBC</acronym> 2.0
24962492
Standard Extension). These features have since been included in
2497-
the core JDBC 3 API. The <productname>PostgreSQL</productname>
2498-
<acronym>JDBC</acronym> drivers support these features if it has been compiled with
2493+
the core <acronym>JDBC</> 3 <acronym>API</>. The
2494+
<productname>PostgreSQL</productname> <acronym>JDBC</acronym> drivers
2495+
support these features if it has been compiled with
24992496
<acronym>JDK</acronym> 1.3.x in combination with the
25002497
<acronym>JDBC</acronym> 2.0 Optional Package
25012498
(<acronym>JDBC</acronym> 2), or with <acronym>JDK</acronym> 1.4 or higher
@@ -2510,7 +2507,7 @@ public void unlink(int oid) throws SQLException
25102507
<title>Overview</title>
25112508

25122509
<para>
2513-
The <acronym>JDBC</acronym> API provides a client
2510+
The <acronym>JDBC</acronym><acronym>API</> provides a client
25142511
and a server interface for connection pooling. The client
25152512
interface is <literal>javax.sql.DataSource</literal>,
25162513
which is what application code will typically use to

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp