Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9A9329FB25E for ; Thu, 19 Oct 2006 00:51:43 -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 66695-02-8 for ; Thu, 19 Oct 2006 00:51:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web30709.mail.mud.yahoo.com (web30709.mail.mud.yahoo.com [68.142.200.142]) by postgresql.org (Postfix) with SMTP id 68E2D9FB4C3 for ; Thu, 19 Oct 2006 00:38:20 -0300 (ADT) Received: (qmail 39502 invoked by uid 60001); 19 Oct 2006 03:38:19 -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; b=ooUsrDaMeOetbxZ9sQ5C+ni99atTRmg2NUBZauIRCnWI8ZkPyBz5Qj7U9crzbNGTjt+bsADuZHp81/us8q4H6H/LE7tIvx83HI7mOVdBlhGT9Wmddhm016maib62OG5rXpIpPeI0WJn9J90M08b6GHLu43ogqgqhUzdqfLaesMc= ; Message-ID: <20061019033819.39500.qmail@web30709.mail.mud.yahoo.com> Received: from [69.143.220.138] by web30709.mail.mud.yahoo.com via HTTP; Wed, 18 Oct 2006 20:38:19 PDT Date: Wed, 18 Oct 2006 20:38:19 -0700 (PDT) From: Stephen Byers Subject: binary copy timestamps with libpq To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1283195519-1161229099=:39488" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.73 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_30_40, HTML_MESSAGE X-Spam-Level: *** X-Archive-Number: 200610/20 X-Sequence-Number: 6303 --0-1283195519-1161229099=:39488 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable I am using postgres 8.1.4 and am trying to use the binary copy interface vi= a libpq (PQputCopyData, PQputCopyEnd). I am having trouble doing the copy = for timestamp fields. =0A=0AI have tried a few different ways, setting the= paramFormat to 0 (ASCII) and paramType to OID_TIMESTAMP (1114). I've trie= d various strings, quoted and unquoted, also with "::timestamp" as part of = the string -- but I am having no luck at getting the data to insert. ('200= 6-10-19 05:26:00'::timestamp)=0A=0AWhat am I doing wrong? Is ASCII support= ed for timestamp type in binary copy mode? If not, how do I convert my tim= estamp to postgres's format (I am using default settings)=0A=0A(I am also h= aving the same trouble with the interval data type.)=0A=0AAny help most app= reciated!=0AThanks,=0ASteve=0A=0A --0-1283195519-1161229099=:39488 Content-Type: text/html; charset=ascii Content-Transfer-Encoding: quoted-printable
I am using postgres 8.1.4 and am trying to use th= e binary copy interface via libpq (PQputCopyData, PQputCopyEnd).  I am= having trouble doing the copy for timestamp fields. 
=0A
&n= bsp;
=0A
I have tried a few different ways, setting the paramForma= t to 0 (ASCII) and paramType to OID_TIMESTAMP (1114).  I've tried vari= ous strings, quoted and unquoted, also with "::timestamp" as part of the st= ring -- but I am having no luck at getting the data to insert.  (= '2006-10-19 05:26:00'::timestamp)
=0A
 
=0A
What am = I doing wrong?  Is ASCII supported for timestamp type in binary c= opy mode?  If not, how do I convert my timestamp to postgres's format = (I am using default settings)
=0A
 
=0A
(I am also h= aving the same trouble with the interval data type.)
=0A
 =0A
Any help most appreciated!
=0A
Thanks,
=0A
Ste= ve

--0-1283195519-1161229099=:39488--