Re: Insert binary data on postgre

Поиск
Список
Период
Сортировка
От Radu-Adrian Popescu
Тема Re: Insert binary data on postgre
Дата
Msg-id 40DC358C.2090109@aldratech.com
обсуждение исходный текст
Ответ на Re: Insert binary data on postgre  ("Eduardo S. Fontanetti" <dufuzzy@yahoo.com.br>)
Список pgsql-admin
Eduardo S. Fontanetti wrote:
> I forgot a little, or better, a big detail, to do this
> translating from binary to ANSI of a file with 100Kb,
> it will return something like 500000 bytes, and this
> process is very, very and very slow. Then I need to
> use another way.
>
> I've tried to use the Replace native function from the
> VB to put a backslash before the ' on the string, but
> it hadn't worked, I think it don't interprets the
> character like postgres. Somebody knows how to solve
> it? How to identify the character exactly like the
> postgres?
>

Check out
http://www.postgresql.org/docs/7.4/interactive/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA

The escape functions are located in the libpq library (PostgreSQL's native C
library), that has a Windows native port.

You may either look at the code and implement that in VB (don't think it will
perform very well though) or write a COM wrapper or something like that to make
those functions available in VB.

Best of luck,
--
Radu-Adrian Popescu
CSA, DBA, Developer
Aldrapay MD
Aldratech Ltd.
+40213212243


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

Предыдущее
От: "Eduardo S. Fontanetti"
Дата:
Сообщение: Re: Insert binary data on postgre
Следующее
От: Carlos Benkendorf
Дата:
Сообщение: SQL preprocessor output