X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7B600D1B7D1 for ; Fri, 25 Jun 2004 09:43:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71690-06 for ; Fri, 25 Jun 2004 12:43:10 +0000 (GMT) Received: from web40712.mail.yahoo.com (web40712.mail.yahoo.com [66.218.78.169]) by svr1.postgresql.org (Postfix) with SMTP id 7D193D1B7C6 for ; Fri, 25 Jun 2004 09:43:05 -0300 (ADT) Message-ID: <20040625124309.92102.qmail@web40712.mail.yahoo.com> Received: from [200.163.192.124] by web40712.mail.yahoo.com via HTTP; Fri, 25 Jun 2004 09:43:09 ART Date: Fri, 25 Jun 2004 09:43:09 -0300 (ART) From: "=?iso-8859-1?q?Eduardo=20S.=20Fontanetti?=" Subject: Re: Insert binary data on postgre To: pgsql-admin@postgresql.org In-Reply-To: <20040625121738.24339.qmail@web40701.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.6 tagged_above=0.0 required=5.0 tests=RCVD_IN_DSBL, RCVD_IN_NJABL, RCVD_IN_NJABL_PROXY, RCVD_IN_SORBS, RCVD_IN_SORBS_HTTP, RCVD_IN_SORBS_SOCKS X-Spam-Level: **** X-Archive-Number: 200406/333 X-Sequence-Number: 13993 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? Thanks Eduardo --- "Eduardo S. Fontanetti" escreveu: > I am using bytea data type and Visual Basic 6. > > I saw in another place, that I can insert byte > values > in the Postgre with a double backslash, then I used > a > function to translate the binary string to ANSI > string. Then I can use: \\001\\010\\047 ... > > Somebody could say me if its right? > > Eduardo > > --- mike g escreveu: > What > data type did you use to define the binary > > column? bytea or LO? > > > > On Thu, 2004-06-24 at 14:16, Eduardo S. Fontanetti > > wrote: > > > How can I do to put a file into the PostgreSQL ? > I > > > have got the contents of file in binary yet and > > put on > > > a String on my APP, but when I try to insert it > on > > > postgre, it returns to me: > > > > > > ERROR: parser: unterminated quoted string at or > > near > > > "BMæ»' at character 90 > > > > > > My string: > > > > > > ConnP.Execute "insert into fotossocios(arquivo) > > > values('" & Conteudo & "')" > > > > > > Could somebody help me how to construct the > right > > > string ? > > > > > > Thanks > > > Eduardo > > > > > > > > > ______________________________________________________________________ > > > > > > Yahoo! Mail - agora com 100MB de espaço, > > anti-spam e antivírus grátis! > > > http://br.info.mail.yahoo.com/ > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > > TIP 5: Have you checked our extensive FAQ? > > > > > > > > http://www.postgresql.org/docs/faqs/FAQ.html > > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 3: if posting/reading through Usenet, please > > send an appropriate > > subscribe-nomail command to > > majordomo@postgresql.org so that your > > message can get through to the mailing list > > cleanly > > > > ______________________________________________________________________ > > Yahoo! Mail - agora com 100MB de espaço, anti-spam e > antivírus grátis! > http://br.info.mail.yahoo.com/ > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose > an index scan if your > joining column's datatypes do not match > ______________________________________________________________________ Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis! http://br.info.mail.yahoo.com/