Re: Help with COPY command

Поиск
Список
Период
Сортировка
От reina_ga@hotmail.com (Tony Reina)
Тема Re: Help with COPY command
Дата
Msg-id 272e4be7.0404071132.4ed06afc@posting.google.com
обсуждение исходный текст
Ответ на Help with COPY command  (reina_ga@hotmail.com (Tony Reina))
Ответы Re: Help with COPY command  (Christoph Haller <ch@rodos.fzk.de>)
Список pgsql-sql
Ok. I found the libpq syntax for COPY in the Programmer's manual. I've
got a working version, but wanted to verify something.

PQexec(conn, "COPY foo FROM STDIN");
PQputline(conn, "3\thello world\t4.5\n");
PQputline(conn,"4\tgoodbye world\t7.11\n");
...
PQputline(conn,"\\.\n");
PQendcopy(conn);

1. I'm assuming that I can put in as many PQputline statements as I
want to between the PQexec("COPY ... FROM ...") and the terminator
line. Is that correct? No limit?

2. Do any of these lines need to be followed by a PQclear(res)? What
about the first PQexec?

-Tony


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

Предыдущее
От: "Christina Zhang"
Дата:
Сообщение: Crypt() encryption
Следующее
От: "yek ching"
Дата:
Сообщение: pgsql multi-database queries