pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
To: sdavis2@mail.nih.gov
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Bulk Load and Extract from PostgreSQL
Date: Tue, 17 Oct 2006 05:28:45 -0700 (PDT)
Message-ID: <20061017122845.64792.qmail@web33313.mail.mud.yahoo.com> (raw)

Hi Sean.

I will try you option. Thanks a lot for the information.

Thanks, 
Sandeep


----- Original Message ----
From: Sean Davis <sdavis2@mail.nih.gov>
To: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Sent: Tuesday, October 17, 2006 5:53:14 PM
Subject: Re: [INTERFACES] Bulk Load and Extract from PostgreSQL


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: <20061017122845.64792.qmail@web33313.mail.mud.yahoo.com>
Permalink:  ../20061017122845.64792.qmail@web33313.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20061017122845.64792.qmail@web33313.mail.mud.yahoo.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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: sandeep_khandelwal27@yahoo.com, sdavis2@mail.nih.gov
  Subject: Re: Bulk Load and Extract from PostgreSQL
  In-Reply-To: <20061017122845.64792.qmail@web33313.mail.mud.yahoo.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