Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A741E9FBA0D for ; Tue, 22 May 2007 15:35:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 06660-03 for ; Tue, 22 May 2007 15:35:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp109.rog.mail.re2.yahoo.com (smtp109.rog.mail.re2.yahoo.com [68.142.225.207]) by postgresql.org (Postfix) with SMTP id 2330A9FBBA5 for ; Tue, 22 May 2007 15:35:13 -0300 (ADT) Received: (qmail 86990 invoked from network); 22 May 2007 18:35:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=NrjoOYPU6ZIxwDMaA+tiQ41y6NrxG3/ox4VppCJj17dvwT9McC+oO3McDo/zmhDNqN1+DR77OOhpCQXso1tGZ8Jm7Sk+bxwUVUjkn+ZMXi+NtrRZemDP+nlg1xGZFoLuxt5yIZ0L0yDxd/PwCDSKYllRzoN44pvNUzhYY5oWHKk= ; Received: from unknown (HELO ?127.0.0.1?) (ymlam@rogers.com@216.209.33.106 with plain) by smtp109.rog.mail.re2.yahoo.com with SMTP; 22 May 2007 18:35:12 -0000 X-YMail-OSG: bCjgmj4VM1nB1C.pLKIS1hh3riRdSis_LiUOKgd6Xnr35_jmsEZKkh41tDQLx1_WEw-- Message-ID: <465337D6.6080103@rogers.com> Date: Tue, 22 May 2007 14:35:02 -0400 From: Jeff Lynn User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: How do you convert PostgreSQL internal binary field to C datatypes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/44 X-Sequence-Number: 6551 Does someone out there has some example(s) of converting the PostgreSQL's internal (network byte order) representation of float4, flost8, date, datetime and timestamp into Win32 float, double, CTime or any Win32 date/time construct under Intel x86 h/w architecture? Andrew McNamara in previous post suggested that there are answers in the server source codes. But for a beginner like me, even though I have extensive coding experience in C, C++ and Java, such undertaking for a significant product like PostgreSQL is a bit overwhelming for now. I really do want to explore the usage of PostgreSQL further! So any help will be greatly appreciated. Jeff,