Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 918689FA1DA for ; Thu, 19 Oct 2006 00:56:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 01938-04-2 for ; Thu, 19 Oct 2006 03:55:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web30705.mail.mud.yahoo.com (web30705.mail.mud.yahoo.com [68.142.200.138]) by postgresql.org (Postfix) with SMTP id 8A5439FB27C for ; Thu, 19 Oct 2006 00:53:30 -0300 (ADT) Received: (qmail 76363 invoked by uid 60001); 19 Oct 2006 03:53:29 -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=rvF7pl8zulQum6F3tR4mPgqN9nPExGye6BKEz+YSRs0Xr7Wz2Tht0CybHpehViu5K1boYz1AKNRo4SI9j3n22woC2L11JNSY+SJBO7wXsu0FIOsYyCqeLGGEV7hgkGazZzDXobfW5FJKydLH7JKKhgIhwJO/mN6p7lruAax9Z88= ; Message-ID: <20061019035329.76361.qmail@web30705.mail.mud.yahoo.com> Received: from [69.143.220.138] by web30705.mail.mud.yahoo.com via HTTP; Wed, 18 Oct 2006 20:53:29 PDT Date: Wed, 18 Oct 2006 20:53:29 -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-1511770547-1161230009=:76059" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.852 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_40_50, HTML_MESSAGE X-Spam-Level: *** X-Archive-Number: 200610/21 X-Sequence-Number: 6304 --0-1511770547-1161230009=:76059 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 th= e paramFormat to 0 (ASCII) and paramType to OID_TIMESTAMP (1114). I've tri= ed 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. ('20= 06-10-19 05:26:00'::timestamp)=0A =0AWhat am I doing wrong? Is ASCII suppo= rted for timestamp type in binary copy mode? If not, how do I convert my t= imestamp to postgres's format (I am using default settings)=0A =0A(I am als= o having the same trouble with the interval data type.)=0A =0AAny help most= appreciated!=0AThanks,=0ASteve=0A=0A --0-1511770547-1161230009=:76059 Content-Type: text/html; charset=ascii Content-Transfer-Encoding: quoted-printable
=0A
I am using postgres 8.1.4 and am try= ing to use the binary copy interface via libpq (PQputCopyData, PQputCopyEnd= ).  I am having trouble doing the copy for timestamp fields.  =0A
 
=0A
I have tried a few different ways, setting t= he paramFormat to 0 (ASCII) and paramType to OID_TIMESTAMP (1114).  I'= ve tried various strings, quoted and unquoted, also with "::timestamp" as p= art of the string -- but I am having no luck at getting the data to in= sert.  ('2006-10-19 05:26:00'::timestamp)
=0A
 
=0A=
What am I doing wrong?  Is ASCII supported for timestamp typ= e in binary copy mode?  If not, how do I convert my timestamp to postg= res's format (I am using default settings)
=0A
 
=0A(I am also having the same trouble with the interval data type.)
=0A<= DIV> 
=0A
Any help most appreciated!
=0A
Thanks,=0A
Steve

=0A
= =0A

--0-1511770547-1161230009=:76059--