Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 44A739FB1E2 for ; Tue, 17 Oct 2006 09:28:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 60088-09 for ; Tue, 17 Oct 2006 09:28:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web33313.mail.mud.yahoo.com (web33313.mail.mud.yahoo.com [68.142.206.128]) by postgresql.org (Postfix) with SMTP id 9B0429FA298 for ; Tue, 17 Oct 2006 09:28:46 -0300 (ADT) Received: (qmail 64794 invoked by uid 60001); 17 Oct 2006 12:28:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cBiqBN3FOV1Oi7bwMmHjtlyRaaUg+ziBnVt/yyIyiWdCZFXBme8Vhmr+HWvbt7/QR6NQrJi0JP+t95Zly2AwYOpikBHN9CEUXY7kFnrAtPUnpZNh0xOS3HgPYPZsFIPFBW2AwBk0yCyku0M1z5UXMo4UFkKn5UGBDVzuiER2Of0= ; Message-ID: <20061017122845.64792.qmail@web33313.mail.mud.yahoo.com> Received: from [220.225.70.2] by web33313.mail.mud.yahoo.com via HTTP; Tue, 17 Oct 2006 05:28:45 PDT Date: Tue, 17 Oct 2006 05:28:45 -0700 (PDT) From: Sandeep Khandelwal Subject: Re: Bulk Load and Extract from PostgreSQL To: sdavis2@mail.nih.gov Cc: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.646 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, FROM_HAS_ULINE_NUMS X-Spam-Level: *** X-Archive-Number: 200610/16 X-Sequence-Number: 6299 Hi Sean.=0A=0AI will try you option. Thanks a lot for the information.=0A= =0AThanks, =0ASandeep=0A=0A=0A----- Original Message ----=0AFrom: Sean Davi= s =0ATo: Sandeep Khandelwal =0ACc: pgsql-interfaces@postgresql.org=0ASent: Tuesday, October 17, = 2006 5:53:14 PM=0ASubject: Re: [INTERFACES] Bulk Load and Extract from Post= greSQL=0A=0A=0AOn Tuesday 17 October 2006 08:18, Sandeep Khandelwal wrote:= =0A> Hi Sean.=0A>=0A> The reference that you mentioned is just for Inclusio= n in the SQL commands=0A> directly. But.........=0A>=0A> I am trying to loa= d coma seperated data using COPY FROM STDIN command (TEXT=0A> mode) and usi= ng PQputCopydata API. COPY FROM STDIN command requires user to=0A> specify = coma seperated text version of all the data.=0A>=0A> My question is: If I h= ave binary data(bytea) then I have to convert this=0A> data into string (ch= ar *) form and pass this data to PostgreSQL using=0A> PQputCopydata API. An= d, I don't have any API in Libpq to convert binary=0A> data into string.=0A= =0ASandeep, =0A=0AI see the issue--sorry about the misunderstanding. I'm n= ot sure what the =0A"correct" answer is, but you could simply do base64 cli= ent-side encoding and =0Adecoding of your data. =0A=0ASean=0A=0A