From: | Radu-Adrian Popescu <radu(dot)popescu(at)aldratech(dot)com> |
---|---|
To: | "Eduardo S(dot) Fontanetti" <dufuzzy(at)yahoo(dot)com(dot)br> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Insert binary data on postgre |
Date: | 2004-06-25 14:24:12 |
Message-ID: | 40DC358C.2090109@aldratech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Carlos Benkendorf | 2004-06-25 16:17:30 | SQL preprocessor output |
Previous Message | Eduardo S. Fontanetti | 2004-06-25 12:43:09 | Re: Insert binary data on postgre |