Please sign in to comment.
Fix the query editor behaviour with COPY
If you run something like: copy (select * from pg_stat_activity) to stdout; in the query editor, it will hang forever. The code in pgQueryThread::execute() doesn't check for a PGRES_COPY_OUT result, and calls PQgetResult() repeatedly. PQgetResult() will keep on returning PGRES_COPY_OUT until the copy output is read with PQgetCopyData(), so it gets stuck. COPY FROM STDIN has a similar problem. This patch fixes that. For COPY TO STDOUT, it prints the first 100 rows to the message display. For COPY FROM STDIN, it throws an error.
- Loading branch information...
Showing with 63 additions and 3 deletions.