Thread: libpq: multiple commands within single query

libpq: multiple commands within single query

From
Вячеслав Блинников
Date:
When I call PQsendQuery(..., "SELECT column1 FROM my_table; SELECT column2 FROM my_table; SELECT column3 FROM my_table") PQgetResult(...) successfully returns three results each containing 1 row and 1 column - that is what I need.
But when I call something like PQsendQuery(..., "SELECT column1 FROM my_table; SELECT some_bad_column_name FROM my_table, SELECT column2 FROM my_table; SELECT column3 FROM my_table") PQgetResult(...) returns just 2 results: first containing 1 row and 1 column and second containing 0 rows and 0 columns.
Is it somehow possible to get two remaining results?