From stephenabyers@yahoo.com Thu Oct 19 03:51:43 2006 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-- From stephenabyers@yahoo.com Thu Oct 19 03:56:24 2006 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-- From stephenabyers@yahoo.com Thu Oct 19 12:24:26 2006 Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5E6FB9FB285 for ; Thu, 19 Oct 2006 09:24:26 -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 26794-05-2 for ; Thu, 19 Oct 2006 12:22:41 +0000 (UTC) X-Greylist: delayed 00:06:38.319036 by SQLgrey- Received: from web30714.mail.mud.yahoo.com (web30714.mail.mud.yahoo.com [68.142.201.252]) by postgresql.org (Postfix) with SMTP id 6425F9FB25E for ; Thu, 19 Oct 2006 09:22:41 -0300 (ADT) Received: (qmail 6756 invoked by uid 60001); 19 Oct 2006 12:15:59 -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=yO6Pl0EYUOT/crg0fs8RSLu6wlShTGm8GKx9Hjflb8XOx8qG6ZMflgwj0GD/XSVa14unN9xEnaI0J7Kle2sip+TAeeji9CdYN3m0a9bPH5RSIZaf8tNigNnP2r5T3TK1DYIoSd/uGvyny71nAO8A24gSs54ZMkkc6JeaWnxZj38= ; Message-ID: <20061019121559.6754.qmail@web30714.mail.mud.yahoo.com> Received: from [199.36.20.5] by web30714.mail.mud.yahoo.com via HTTP; Thu, 19 Oct 2006 05:15:59 PDT Date: Thu, 19 Oct 2006 05:15:59 -0700 (PDT) From: Stephen Byers Subject: Re: binary copy timestamps with libpq To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-689457914-1161260159=:5658" 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/22 X-Sequence-Number: 6305 --0-689457914-1161260159=:5658 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable I just discovered PGTYPEStimestamp_from_asc(). =0AI'm sure that will help m= e -- is this the correct method to use?=0A=0A=0A----- Original Message ----= =0AFrom: Stephen Byers =0ATo: pgsql-interfaces@pos= tgresql.org=0ASent: Wednesday, October 18, 2006 11:38:19 PM=0ASubject: [INT= ERFACES] binary copy timestamps with libpq=0A=0A=0AI am using postgres 8.1.= 4 and am trying to use the binary copy interface via 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 (ASC= II) and paramType to OID_TIMESTAMP (1114). I've tried various strings, quo= ted and unquoted, also with "::timestamp" as part of the string -- but I am= having no luck at getting the data to insert. ('2006-10-19 05:26:00'::tim= estamp)=0A =0AWhat am I doing wrong? Is ASCII supported for timestamp type= in binary copy mode? If not, how do I convert my timestamp to postgres's = format (I am using default settings)=0A =0A(I am also having the same troub= le with the interval data type.)=0A =0AAny help most appreciated!=0AThanks,= =0ASteve=0A=0A --0-689457914-1161260159=:5658 Content-Type: text/html; charset=ascii Content-Transfer-Encoding: quoted-printable
I just discovered PGTY= PEStimestamp_from_asc().
=0A
I'm sure that will help me -- is this the co= rrect method to use?
=0A

 
=0A
= ----- Original Message ----
From: Stephen Byers <stephenabyers@yahoo.= com>
To: pgsql-interfaces@postgresql.org
Sent: Wednesday, October = 18, 2006 11:38:19 PM
Subject: [INTERFACES] binary copy timestamps with l= ibpq

=0A
=0A
I am using postgres 8.1.4 and am tryi= ng 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 th= e paramFormat to 0 (ASCII) and paramType to OID_TIMESTAMP (1114).  I'v= e tried various strings, quoted and unquoted, also with "::timestamp" as pa= rt of the string -- but I am having no luck at getting the data to ins= ert.  ('2006-10-19 05:26:00'::timestamp)
=0A
 
=0A<= DIV>What am I doing wrong?  Is ASCII supported for timestamp type= in binary copy mode?  If not, how do I convert my timestamp to postgr= es's format (I am using default settings)
=0A
 
=0A
= (I am also having the same trouble with the interval data type.)
=0A 
=0A
Any help most appreciated!
=0A
Thanks,=0A
Steve

=0A


--0-689457914-1161260159=:5658--