SQL Editor hangs on COPY TO STDOUT

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема SQL Editor hangs on COPY TO STDOUT
Дата
Msg-id 509D0291.9030004@vmware.com
обсуждение исходный текст
Ответы Re: SQL Editor hangs on COPY TO STDOUT  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgadmin-hackers
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 STDOUT has a similar problem.

Attached is a patch to fix that. For COPY TO STDOUT, it prints the first
100 rows to the message display. For COPY FROM STDIN, it throws an error.

- Heikki

Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pg_scanner - patch no.1
Следующее
От: Vladimir Kokovic
Дата:
Сообщение: Re: pg_scanner - patch no.1