aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2010-02-16 20:58:14 +0000
committerBruce Momjian <bruce@momjian.us>2010-02-16 20:58:14 +0000
commitaa7e7ae9a6adfd5553ed05144cf765fbf7c8f5af (patch)
treefc46bf6e0d1c1a278c30c8e41a5e19547786d55b /doc/src
parent346a721eed4c0bcfb07039633807b67443f21bbf (diff)
downloadpostgresql-aa7e7ae9a6adfd5553ed05144cf765fbf7c8f5af.tar.gz
postgresql-aa7e7ae9a6adfd5553ed05144cf765fbf7c8f5af.zip
Have SELECT and CREATE TABLE AS queries return a row count. While this
is invisible in psql, other interfaces, like libpq, make this value visible. Boszormenyi Zoltan
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml21
-rw-r--r--doc/src/sgml/protocol.sgml8
2 files changed, 17 insertions, 12 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index c7131fea4c4..4972a8c2592 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.297 2010/02/05 03:09:04 joe Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.298 2010/02/16 20:58:13 momjian Exp $ -->
<chapter id="libpq">
<title><application>libpq</application> - C Library</title>
@@ -2869,12 +2869,11 @@ typedef struct {
</sect2>
<sect2 id="libpq-exec-nonselect">
- <title>Retrieving Result Information for Other Commands</title>
+ <title>Retrieving Other Result Information</title>
<para>
- These functions are used to extract information from
- <structname>PGresult</structname> objects that are not
- <command>SELECT</> results.
+ These functions are used to extract other information from
+ <structname>PGresult</structname> objects.
</para>
<variablelist>
@@ -2925,12 +2924,12 @@ typedef struct {
This function returns a string containing the number of rows
affected by the <acronym>SQL</> statement that generated the
<structname>PGresult</>. This function can only be used following
- the execution of an <command>INSERT</>, <command>UPDATE</>,
- <command>DELETE</>, <command>MOVE</>, <command>FETCH</>, or
- <command>COPY</> statement, or an <command>EXECUTE</> of a
- prepared query that contains an <command>INSERT</>,
- <command>UPDATE</>, or <command>DELETE</> statement. If the
- command that generated the <structname>PGresult</> was anything
+ the execution of a <command>SELECT</>, <command>CREATE TABLE AS</>,
+ <command>INSERT</>, <command>UPDATE</>, <command>DELETE</>,
+ <command>MOVE</>, <command>FETCH</>, or <command>COPY</> statement,
+ or an <command>EXECUTE</> of a prepared query that contains an
+ <command>INSERT</>, <command>UPDATE</>, or <command>DELETE</> statement.
+ If the command that generated the <structname>PGresult</> was anything
else, <function>PQcmdTuples</> returns an empty string. The caller
should not free the return value directly. It will be freed when
the associated <structname>PGresult</> handle is passed to
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 5b69f373243..e4364ec305f 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.79 2010/02/16 20:15:14 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.80 2010/02/16 20:58:14 momjian Exp $ -->
<chapter id="protocol">
<title>Frontend/Backend Protocol</title>
@@ -2222,6 +2222,12 @@ CommandComplete (B)
</para>
<para>
+ For a <command>SELECT</command> or <command>CREATE TABLE AS</command>
+ command, the tag is <literal>SELECT <replaceable>rows</replaceable></literal>
+ where <replaceable>rows</replaceable> is the number of rows retrieved.
+ </para>
+
+ <para>
For a <command>MOVE</command> command, the tag is
<literal>MOVE <replaceable>rows</replaceable></literal> where
<replaceable>rows</replaceable> is the number of rows the