@@ -2274,20 +2274,6 @@ const char *PQparameterStatus(const PGconn *conn, const char *paramName);
2274
2274
cannot change after startup.
2275
2275
</para>
2276
2276
2277
- <para>
2278
- Pre-3.0-protocol servers do not report parameter settings, but
2279
- <application>libpq</application> includes logic to obtain values for
2280
- <varname>server_version</varname> and <varname>client_encoding</varname> anyway.
2281
- Applications are encouraged to use <xref linkend="libpq-PQparameterStatus"/>
2282
- rather than <foreignphrase>ad hoc</foreignphrase> code to determine these values.
2283
- (Beware however that on a pre-3.0 connection, changing
2284
- <varname>client_encoding</varname> via <command>SET</command> after connection
2285
- startup will not be reflected by <xref linkend="libpq-PQparameterStatus"/>.)
2286
- For <varname>server_version</varname>, see also
2287
- <xref linkend="libpq-PQserverVersion"/>, which returns the information in a
2288
- numeric form that is much easier to compare against.
2289
- </para>
2290
-
2291
2277
<para>
2292
2278
If no value for <varname>standard_conforming_strings</varname> is reported,
2293
2279
applications can assume it is <literal>off</literal>, that is, backslashes
@@ -2314,15 +2300,12 @@ const char *PQparameterStatus(const PGconn *conn, const char *paramName);
2314
2300
int PQprotocolVersion(const PGconn *conn);
2315
2301
</synopsis>
2316
2302
Applications might wish to use this function to determine whether certain
2317
- features are supported. Currently, the possible values are 2 (2.0
2318
- protocol), 3 (3.0 protocol), or zero (connection bad). The
2319
- protocol version will
2303
+ features are supported. Currently, the possible values are 3
2304
+ (3.0 protocol), or zero (connection bad). The protocol version will
2320
2305
not change after connection startup is complete, but it could
2321
- theoretically change during a connection reset. The 3.0 protocol
2322
- will normally be used when communicating with
2323
- <productname>PostgreSQL</productname> 7.4 or later servers; pre-7.4 servers
2324
- support only protocol 2.0. (Protocol 1.0 is obsolete and not
2325
- supported by <application>libpq</application>.)
2306
+ theoretically change during a connection reset. The 3.0 protocol is
2307
+ supported by <productname>PostgreSQL</productname> server versions 7.4
2308
+ and above.
2326
2309
</para>
2327
2310
</listitem>
2328
2311
</varlistentry>
@@ -2739,8 +2722,7 @@ PGresult *PQexecParams(PGconn *conn,
2739
2722
<xref linkend="libpq-PQexecParams"/> is like <xref linkend="libpq-PQexec"/>, but offers additional
2740
2723
functionality: parameter values can be specified separately from the command
2741
2724
string proper, and query results can be requested in either text or binary
2742
- format. <xref linkend="libpq-PQexecParams"/> is supported only in protocol 3.0 and later
2743
- connections; it will fail when using protocol 2.0.
2725
+ format.
2744
2726
</para>
2745
2727
2746
2728
<para>
@@ -2917,8 +2899,6 @@ PGresult *PQprepare(PGconn *conn,
2917
2899
execution with <xref linkend="libpq-PQexecPrepared"/>. This feature allows
2918
2900
commands to be executed repeatedly without being parsed and
2919
2901
planned each time; see <xref linkend="sql-prepare"/> for details.
2920
- <xref linkend="libpq-PQprepare"/> is supported only in protocol 3.0 and later
2921
- connections; it will fail when using protocol 2.0.
2922
2902
</para>
2923
2903
2924
2904
<para>
@@ -2992,9 +2972,7 @@ PGresult *PQexecPrepared(PGconn *conn,
2992
2972
This feature allows commands that will be used repeatedly to be
2993
2973
parsed and planned just once, rather than each time they are
2994
2974
executed. The statement must have been prepared previously in
2995
- the current session. <xref linkend="libpq-PQexecPrepared"/> is supported
2996
- only in protocol 3.0 and later connections; it will fail when
2997
- using protocol 2.0.
2975
+ the current session.
2998
2976
</para>
2999
2977
3000
2978
<para>
@@ -3021,8 +2999,6 @@ PGresult *PQdescribePrepared(PGconn *conn, const char *stmtName);
3021
2999
<para>
3022
3000
<xref linkend="libpq-PQdescribePrepared"/> allows an application to obtain
3023
3001
information about a previously prepared statement.
3024
- <xref linkend="libpq-PQdescribePrepared"/> is supported only in protocol 3.0
3025
- and later connections; it will fail when using protocol 2.0.
3026
3002
</para>
3027
3003
3028
3004
<para>
@@ -3059,8 +3035,6 @@ PGresult *PQdescribePortal(PGconn *conn, const char *portalName);
3059
3035
(<application>libpq</application> does not provide any direct access to
3060
3036
portals, but you can use this function to inspect the properties
3061
3037
of a cursor created with a <command>DECLARE CURSOR</command> SQL command.)
3062
- <xref linkend="libpq-PQdescribePortal"/> is supported only in protocol 3.0
3063
- and later connections; it will fail when using protocol 2.0.
3064
3038
</para>
3065
3039
3066
3040
<para>
@@ -3566,8 +3540,6 @@ char *PQresultErrorField(const PGresult *res, int fieldcode);
3566
3540
<para>
3567
3541
Errors generated internally by <application>libpq</application> will
3568
3542
have severity and primary message, but typically no other fields.
3569
- Errors returned by a pre-3.0-protocol server will include severity and
3570
- primary message, and sometimes a detail message, but no other fields.
3571
3543
</para>
3572
3544
3573
3545
<para>
@@ -3728,8 +3700,7 @@ Oid PQftable(const PGresult *res,
3728
3700
3729
3701
<para>
3730
3702
<literal>InvalidOid</literal> is returned if the column number is out of range,
3731
- or if the specified column is not a simple reference to a table column,
3732
- or when using pre-3.0 protocol.
3703
+ or if the specified column is not a simple reference to a table column.
3733
3704
You can query the system table <literal>pg_class</literal> to determine
3734
3705
exactly which table is referenced.
3735
3706
</para>
@@ -3759,8 +3730,7 @@ int PQftablecol(const PGresult *res,
3759
3730
3760
3731
<para>
3761
3732
Zero is returned if the column number is out of range, or if the
3762
- specified column is not a simple reference to a table column, or
3763
- when using pre-3.0 protocol.
3733
+ specified column is not a simple reference to a table column.
3764
3734
</para>
3765
3735
</listitem>
3766
3736
</varlistentry>
@@ -4593,8 +4563,8 @@ int PQsendQueryParams(PGconn *conn,
4593
4563
query parameters can be specified separately from the query string.
4594
4564
The function's parameters are handled identically to
4595
4565
<xref linkend="libpq-PQexecParams"/>. Like
4596
- <xref linkend="libpq-PQexecParams"/>, it will not work on 2.0-protocol
4597
- connections, and it allows only one command in the query string.
4566
+ <xref linkend="libpq-PQexecParams"/>, it allows only one command in the
4567
+ query string.
4598
4568
</para>
4599
4569
</listitem>
4600
4570
</varlistentry>
@@ -4619,9 +4589,7 @@ int PQsendPrepare(PGconn *conn,
4619
4589
After a successful call, call <xref linkend="libpq-PQgetResult"/> to
4620
4590
determine whether the server successfully created the prepared
4621
4591
statement. The function's parameters are handled identically to
4622
- <xref linkend="libpq-PQprepare"/>. Like
4623
- <xref linkend="libpq-PQprepare"/>, it will not work on 2.0-protocol
4624
- connections.
4592
+ <xref linkend="libpq-PQprepare"/>.
4625
4593
</para>
4626
4594
</listitem>
4627
4595
</varlistentry>
@@ -4647,9 +4615,7 @@ int PQsendQueryPrepared(PGconn *conn,
4647
4615
the command to be executed is specified by naming a
4648
4616
previously-prepared statement, instead of giving a query string.
4649
4617
The function's parameters are handled identically to
4650
- <xref linkend="libpq-PQexecPrepared"/>. Like
4651
- <xref linkend="libpq-PQexecPrepared"/>, it will not work on
4652
- 2.0-protocol connections.
4618
+ <xref linkend="libpq-PQexecPrepared"/>.
4653
4619
</para>
4654
4620
</listitem>
4655
4621
</varlistentry>
@@ -4669,9 +4635,7 @@ int PQsendDescribePrepared(PGconn *conn, const char *stmtName);
4669
4635
it returns 1 if it was able to dispatch the request, and 0 if not.
4670
4636
After a successful call, call <xref linkend="libpq-PQgetResult"/> to
4671
4637
obtain the results. The function's parameters are handled
4672
- identically to <xref linkend="libpq-PQdescribePrepared"/>. Like
4673
- <xref linkend="libpq-PQdescribePrepared"/>, it will not work on
4674
- 2.0-protocol connections.
4638
+ identically to <xref linkend="libpq-PQdescribePrepared"/>.
4675
4639
</para>
4676
4640
</listitem>
4677
4641
</varlistentry>
@@ -4691,9 +4655,7 @@ int PQsendDescribePortal(PGconn *conn, const char *portalName);
4691
4655
it returns 1 if it was able to dispatch the request, and 0 if not.
4692
4656
After a successful call, call <xref linkend="libpq-PQgetResult"/> to
4693
4657
obtain the results. The function's parameters are handled
4694
- identically to <xref linkend="libpq-PQdescribePortal"/>. Like
4695
- <xref linkend="libpq-PQdescribePortal"/>, it will not work on
4696
- 2.0-protocol connections.
4658
+ identically to <xref linkend="libpq-PQdescribePortal"/>.
4697
4659
</para>
4698
4660
</listitem>
4699
4661
</varlistentry>
@@ -5460,13 +5422,6 @@ typedef struct pgNotify
5460
5422
</variablelist>
5461
5423
</para>
5462
5424
5463
- <note>
5464
- <para>
5465
- These additional data values are only available when using protocol
5466
- 3.0. When using protocol 2.0, all these functions will return 0.
5467
- </para>
5468
- </note>
5469
-
5470
5425
<sect2 id="libpq-copy-send">
5471
5426
<title>Functions for Sending <command>COPY</command> Data</title>
5472
5427
@@ -5531,9 +5486,7 @@ int PQputCopyEnd(PGconn *conn,
5531
5486
<parameter>errormsg</parameter> used as the error message. (One should not
5532
5487
assume that this exact error message will come back from the server,
5533
5488
however, as the server might have already failed the
5534
- <command>COPY</command> for its own reasons. Also note that the option
5535
- to force failure does not work when using pre-3.0-protocol
5536
- connections.)
5489
+ <command>COPY</command> for its own reasons.)
5537
5490
</para>
5538
5491
5539
5492
<para>
0 commit comments