From: Stephen Byers <stephenabyers@yahoo.com>
To: pgsql-interfaces@postgresql.org
Subject: binary copy timestamps with libpq
Date: Wed, 18 Oct 2006 20:38:19 -0700 (PDT)
Message-ID: <20061019033819.39500.qmail@web30709.mail.mud.yahoo.com> (raw)
I 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.
I have tried a few different ways, setting the paramFormat to 0 (ASCII) and paramType to OID_TIMESTAMP (1114). I've tried 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. ('2006-10-19 05:26:00'::timestamp)
What 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)
(I am also having the same trouble with the interval data type.)
Any help most appreciated!
Thanks,
Steve
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: stephenabyers@yahoo.com
Subject: Re: binary copy timestamps with libpq
In-Reply-To: <20061019033819.39500.qmail@web30709.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