pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radu-Adrian Popescu <radu.popescu@aldratech.com>
To: Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Insert binary data on postgre
Date: Fri, 25 Jun 2004 17:24:12 +0300
Message-ID: <40DC358C.2090109@aldratech.com> (raw)
In-Reply-To: <20040625124309.92102.qmail@web40712.mail.yahoo.com>
References: <20040625124309.92102.qmail@web40712.mail.yahoo.com>

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




view thread (9+ messages)  latest in thread

Message-ID: <40DC358C.2090109@aldratech.com>
Permalink:  ../40DC358C.2090109@aldratech.com/
Also on:    postgresql.org/message-id/40DC358C.2090109@aldratech.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: radu.popescu@aldratech.com, dufuzzy@yahoo.com.br
  Subject: Re: Insert binary data on postgre
  In-Reply-To: <40DC358C.2090109@aldratech.com>
  References: <20040625124309.92102.qmail@web40712.mail.yahoo.com> <40DC358C.2090109@aldratech.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox