Bulk Load and Extract from PostgreSQL

Поиск
Список
Период
Сортировка
От Sandeep Khandelwal
Тема Bulk Load and Extract from PostgreSQL
Дата
Msg-id 20061018052301.34516.qmail@web33315.mail.mud.yahoo.com
обсуждение исходный текст
Список pgsql-interfaces
Hi All.

I want to read and write bulk data into PostgreSQL using Libpq C API and right now I am under the investigation phase.
Alsowant to delete and update into PostgreSQL using Libpq API. 

PLease let me know

Read -
I am planning to use COPY DATA TO command in TEXT mode for reading, I am using PQgetCopydata function to get data one
rowat a time. 
Problem -
a - Not sure whether PQgetCopydata will give NULL terminated string or \n terminated string.
b - I know that PQgetCopydata API will give data of all the rows , seperated by delimiter, in TEXT format. But don't
knowhow to convert this text data into corresponding data type, especially BYTEA. 
c - Don't know what are the special characters and how these are handeled by PQgetCopydata and How I should hendel
them.

Load -
I am planning to use COPY DATA FROM command in TEXT mode for writing, I am using PQputCopydata function to send data
onerow at a time. 
Problem -
a - Not sure what are the special characters and how I should miodify them.
b - PQputCopydata API takes data of all the rows, seperated by delimiter, ini string representation. Don't know how to
convertall the datatypes into string representation, especially BYTEA. 

Waiting for reply.

Thanks,
Sandep




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

Предыдущее
От: "Francisco Figueiredo Jr."
Дата:
Сообщение: Npgsql 1.0 Released!!
Следующее
От: Marko Bozikovic
Дата:
Сообщение: Postgres OLE DB provider - query parameters