Aloha!
I am trying to retrieve the number of rows copied by a COPY command
inside a plpgsql function.
The docs tell me, that the "command tag" holds this information. But
how to access the command tag from within a plpgsql function?
http://www.postgresql.org/docs/9.0/interactive/sql-copy.html
I am COPYing the huge result of a complex SQL query to a file and
would like to output the number of rows. I could write to a temp table
and use
GET DIAGNOSTICS integer_var = ROW_COUNT;
and COPY from there. But that takes twice as long. GET DIAGNOSTICS
does not currently work for COPY ..
Am I missing something?
TIA
Erwin Brandstetter
Есть вопросы? Напишите нам!
✖
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера