tuple count and v3 functions in psql for COPY
От | Volkan YAZICI |
---|---|
Тема | tuple count and v3 functions in psql for COPY |
Дата | |
Msg-id | 20051218101317.GA548@alamut обсуждение исходный текст |
Ответы |
Re: tuple count and v3 functions in psql for COPY
Re: tuple count and v3 functions in psql for COPY |
Список | pgsql-patches |
I tried to prepare a patch for these TODO items: - Have COPY return the number of rows loaded/unloaded? - Update [pg_dump and] psql to use the new COPY libpq API. Added an "uint64 processed" to "struct CopyStateData". It's incremented each time on a tuple send/receive made by CopyTo/CopyFrom. Collected result is added to COPY command's commandTag which can be gathered by PQcmdStatus(). (Also updated PQcmdTuples() to work with it.) When I tried to modify psql to print the COPY's commandTag, I found that its implementation is really disorganized when we still use old COPY commands. Thus replaced old COPY routines with the new ones. (IMHO, modified design for the psql's COPY should work faster than the previous. Because, in this patch, I don't read input one by one with getc(). Just filled the buffer with fgets and made \r search only in the first and last lines.) Regards. -- "We are the middle children of history, raised by television to believe that someday we'll be millionaires and movie stars and rock stars, but we won't. And we're just learning this fact," Tyler said. "So don't fuck with us."
Вложения
В списке pgsql-patches по дате отправления: