Re: COPY support in JDBC driver?

Поиск
Список
Период
Сортировка
От Daniel Migowski
Тема Re: COPY support in JDBC driver?
Дата
Msg-id 48DA51B1.8090204@ikoffice.de
обсуждение исходный текст
Ответ на Re: COPY support in JDBC driver?  ("Michael Nacos" <m.nacos@gmail.com>)
Ответы Re: COPY support in JDBC driver?  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Michael Nacos schrieb:
> Hi Mark,
>
> if you want COPY support from the JDBC driver just for performance
> reasons, you should probably also consider using the driver's batch
> mode. Please have a look at the following links:
>
> http://archives.postgresql.org/pgsql-jdbc/2007-04/msg00076.php
> http://freeyourtech.wordpress.com/2008/07/15/using-postgresql-jdbc-for-bulk-updates-batch-size-vs-performance/
>
> Encoding is a serious consideration. While testing pgBee, I ran into
> problems inserting codepage 1252 files into a SQL_ASCII database,
> because of character mismatches. In your Java application, you may
> specify a particular charset for reading the input files. I haven't
> used the patch, but if support for the COPY operation is to be
> included in the driver, please make sure the driver handles such
> things with care.
AFAIK is UTF-8 the only encoding which the driver supports, anyway. And
the native Java encoding, too. In my opinion the API should either
support Writers and Readers (instead of Output- and InputStream), so the
application has to take care for the encoding itself, or the API should
encapsulate setting an arbitrary encoding on the server side before the
copy command, and return to the default encoding directly afterwards.

Please note that this might create conflicts with error mesages and
notices thrown during the copy command.

With best regards,
Daniel Migowski

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

Предыдущее
От: "Michael Nacos"
Дата:
Сообщение: Re: COPY support in JDBC driver?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: COPY support in JDBC driver?