Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 507F49FB32D for ; Sun, 4 Mar 2007 15:17:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 25921-02 for ; Sun, 4 Mar 2007 15:17:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 54F429FB272 for ; Sun, 4 Mar 2007 15:17:23 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l24JHJJW021618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 4 Mar 2007 12:17:21 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l24JHI9W039669; Sun, 4 Mar 2007 12:17:18 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l24JHIkC039668; Sun, 4 Mar 2007 12:17:18 -0700 (MST) (envelope-from mfuhr) Date: Sun, 4 Mar 2007 12:17:18 -0700 From: Michael Fuhr To: "::Willi the One::" Cc: pgsql-interfaces@postgresql.org Subject: Re: Retrieving timestamp data Message-ID: <20070304191718.GA39524@winnie.fuhr.org> References: <20070304172355.GA38897@winnie.fuhr.org> <20070304175459.82626.qmail@web36710.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070304175459.82626.qmail@web36710.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.058 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_PASS X-Spam-Level: X-Archive-Number: 200703/15 X-Sequence-Number: 6456 On Sun, Mar 04, 2007 at 09:54:59AM -0800, ::Willi the One:: wrote: > > Unless you request results in binary format all values will be > > returned as text strings. What happened when you tried it? Are > > you requesting results in binary format? > > So all data are returned as string unless I say so? PQexecParams() and PQexecPrepared() take an argument that specifies the result format so you have to indicate which format you want. PQexec() doesn't take a format argument so it returns results in text format unless you're fetching from a binary cursor. > by the way, are there any site containing tutorials on > libpq? Probably; Google is your friend :-) -- Michael Fuhr