aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-exec.c
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 /src/interfaces/libpq/fe-exec.c
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 'src/interfaces/libpq/fe-exec.c')
-rw-r--r--src/interfaces/libpq/fe-exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 2e5551d31e5..df4e8879c84 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.208 2010/01/21 18:43:25 rhaas Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.209 2010/02/16 20:58:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2752,7 +2752,8 @@ PQcmdTuples(PGresult *res)
goto interpret_error; /* no space? */
p++;
}
- else if (strncmp(res->cmdStatus, "DELETE ", 7) == 0 ||
+ else if (strncmp(res->cmdStatus, "SELECT ", 7) == 0 ||
+ strncmp(res->cmdStatus, "DELETE ", 7) == 0 ||
strncmp(res->cmdStatus, "UPDATE ", 7) == 0)
p = res->cmdStatus + 7;
else if (strncmp(res->cmdStatus, "FETCH ", 6) == 0)