Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8BE3B9FB283 for ; Tue, 17 Oct 2006 02:36:12 -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 29753-09 for ; Tue, 17 Oct 2006 02:36:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web33309.mail.mud.yahoo.com (web33309.mail.mud.yahoo.com [68.142.206.124]) by postgresql.org (Postfix) with SMTP id 352A79FB279 for ; Tue, 17 Oct 2006 02:36:07 -0300 (ADT) Received: (qmail 33291 invoked by uid 60001); 17 Oct 2006 05:36:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EJKoH/mjom/sT411hWA3Ap6FsMxQGcduyjPtqD1Jwc5wQUe1GDqwJC42HoT59et5SBFxcAqjtaNhluMV1oN4QdlWDGY46+49d196XfKWmTK9RZpHrF+YUasXeMg99+3o98vr2kjbSRbDGNL1X/YyNvdS/1u/awi+K/NhY95NLew= ; Message-ID: <20061017053603.33289.qmail@web33309.mail.mud.yahoo.com> Received: from [220.225.70.2] by web33309.mail.mud.yahoo.com via HTTP; Mon, 16 Oct 2006 22:36:03 PDT Date: Mon, 16 Oct 2006 22:36:03 -0700 (PDT) From: Sandeep Khandelwal Subject: Re: Bulk Load and Extract from PostgreSQL To: sdavis2@mail.nih.gov, 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=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, FROM_HAS_ULINE_NUMS X-Spam-Level: *** X-Archive-Number: 200610/12 X-Sequence-Number: 6295 Hi Sean.=0A=0AThanks for the reply.=0A=0AI have one more question. While ex= tracting data using COPT TO command (in TEXT mode) we have an API, PQunesca= peBytea, to convert string representation of binary data(bytea) into binary= . Similary we need to convert binary data into it's string representation w= hile loading data into PostgreSQL ,using COPY FROM command in TEXT mode, wi= th PQputCopydata. But there is no API to convert binary data into it's stri= ng representation. Could you tell me API or I am misinterpreting something.= =0A=0AThanks in advance,=0ASandeep=0A=0A=0A----- Original Message ----=0AFr= om: Sean Davis =0ATo: pgsql-interfaces@postgresql.org= =0ACc: Sandeep Khandelwal =0ASent: Monday, = October 16, 2006 4:04:45 PM=0ASubject: Re: [INTERFACES] Bulk Load and Extra= ct from PostgreSQL=0A=0A=0AOn Monday 16 October 2006 03:07, Sandeep Khandel= wal wrote:=0A> Hi All.=0A>=0A> I want to extract and Load data from Postgre= SQL using Libpq C API. Please=0A> let me know which approach will be good t= o load large number of rows into=0A> PostgreSQL(Insert or COPY FROM) and, w= hich approach will be good to extract=0A> large number of rows from Postgre= SQL (COPY TO or SELECT). I want to handle=0A> all the data types supported = in the PostgreSQL.=0A=0Acopy is the faster way to go for a single table. = =0A=0ASean=0A=0A---------------------------(end of broadcast)--------------= -------------=0ATIP 9: In versions below 8.0, the planner will ignore your = desire to=0A choose an index scan if your joining column's datatypes = do not=0A match=0A=0A