"money" binary representation

From: Konstantin Izmailov <pgfizm(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: "money" binary representation
Date: 2009-11-16 04:07:34
Message-ID: 72746b5e0911152007y57c7d80aq6ac442232fa37086@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to read "money" field using PQgetvalue (PostgreSQL 8.3.7). The
function returns 9 bytes, smth like 0h 0h 0h 0h 0h 0h 14h 0h 0h, for the
value '$50.2'. I could not find description anywhere on how to convert the
binary data into, for example, a double precision number.

Would you please help me find a method of converting binary "money" data
into a double precision?

Thank you!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-11-16 04:38:55 Re: "money" binary representation
Previous Message Greg Smith 2009-11-16 03:16:01 Re: Voting: "pg_ctl init" versus "initdb"