Document that PQoidValue(), PQcmdTuples(), and PQoidStatus() now work
authorNeil Conway
Sat, 24 Apr 2004 22:53:44 +0000 (22:53 +0000)
committerNeil Conway
Sat, 24 Apr 2004 22:53:44 +0000 (22:53 +0000)
when the command that generated the PGresult was an EXECUTE of an
appropriate prepared statement.

doc/src/sgml/libpq.sgml

index 4fa8688e3ddd84dfbb50375d96e469d68a5643c3..0d532a7844a342e47e0cf2b11f346eae2cfe06ca 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -1941,14 +1941,19 @@ char *PQcmdTuples(PGresult *res);
 
 
 
-          If the SQL command that generated the
-          PGresult was INSERT,
-          UPDATE, DELETEMOVE,
-          or FETCH, this returns a
-          string containing the number of rows affected.  If the
-          command was anything else, it returns the empty string. The
-          caller should not free the result directly. It will be freed 
-          when the associated PGresult handle is passed to
+          This function returns a string containing the number of rows
+          affected by the SQL statement that generated the
+          PGresult. This function can only be used
+          following the execution of an INSERT,
+          UPDATE, DELETE, MOVE, or
+          FETCH statement, or an EXECUTE of a
+          prepared query that contains a INSERT,
+          UPDATE, or DELETE statement.  If the
+          command that generated the PGresult was
+          anything else, PQcmdTuples returns the empty
+          string. The caller should not free the return value
+          directly. It will be freed when the associated
+          PGresult handle is passed to
           PQclear.
 
 
@@ -1959,11 +1964,14 @@ char *PQcmdTuples(PGresult *res);
 
 
           Returns the OIDOIDin
-          libpq of the inserted row, if the
-          SQL command was an
-          INSERT that inserted exactly one row into
-          a table that has OIDs.  Otherwise, returns
-          InvalidOid.
+          libpq of the inserted row, if the SQL
+          command was an INSERT that inserted exactly one
+          row into a table that has OIDs, or a EXECUTE of
+          a prepared query containing a suitable INSERT
+          statement.  Otherwise, this function returns
+          InvalidOid. This function will also
+          return InvalidOid if the table affected
+          by the INSERT statement does not contain OIDs.
 
 Oid PQoidValue(const PGresult *res);
 
@@ -1977,7 +1985,9 @@ Oid PQoidValue(const PGresult *res);
 
           Returns a string with the OID of the inserted row, if the
           SQL command was an
-          INSERT.  (The string will be
+          INSERT that inserted exactly one row, or
+          a EXECUTE of a prepared statement
+          consisting of a suitable INSERT.  (The string will be
           0 if the INSERT did not
           insert exactly one row, or if the target table does not have
           OIDs.)  If the command was not an INSERT,