diff options
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r-- | src/bin/psql/common.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index ed340a466f9..5249336bcf2 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1668,7 +1668,15 @@ ExecQueryAndProcessResults(const char *query, } break; case PSQL_SEND_QUERY: - success = PQsendQuery(pset.db, query); + if (PQpipelineStatus(pset.db) != PQ_PIPELINE_OFF) + { + success = PQsendQueryParams(pset.db, query, + 0, NULL, NULL, NULL, NULL, 0); + if (success) + pset.piped_commands++; + } + else + success = PQsendQuery(pset.db, query); break; } |