pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Davis <sdavis2@mail.nih.gov>
To: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Bulk Load and Extract from PostgreSQL
Date: Tue, 17 Oct 2006 08:23:14 -0400
Message-ID: <200610170823.14970.sdavis2@mail.nih.gov> (raw)
In-Reply-To: <20061017121825.72937.qmail@web33309.mail.mud.yahoo.com>
References: <20061017121825.72937.qmail@web33309.mail.mud.yahoo.com>

On Tuesday 17 October 2006 08:18, Sandeep Khandelwal wrote:
> Hi Sean.
>
> The reference that you mentioned is just for Inclusion in the SQL commands
> directly. But.........
>
> I am trying to load coma seperated data using COPY FROM STDIN command (TEXT
> mode) and using PQputCopydata API. COPY FROM STDIN command requires user to
> specify coma seperated text version of all the data.
>
> My question is: If I have binary data(bytea) then I have to convert this
> data into string (char *) form and pass this data to PostgreSQL using
> PQputCopydata API. And, I don't have any API in Libpq to convert binary
> data into string.

Sandeep, 

I see the issue--sorry about the misunderstanding.  I'm not sure what the 
"correct" answer is, but you could simply do base64 client-side encoding and 
decoding of your data.  

Sean



view thread (8+ messages)  latest in thread

Message-ID: <200610170823.14970.sdavis2@mail.nih.gov>
Permalink:  ../200610170823.14970.sdavis2@mail.nih.gov/
Also on:    postgresql.org/message-id/200610170823.14970.sdavis2@mail.nih.gov

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: sdavis2@mail.nih.gov, sandeep_khandelwal27@yahoo.com
  Subject: Re: Bulk Load and Extract from PostgreSQL
  In-Reply-To: <200610170823.14970.sdavis2@mail.nih.gov>

* 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