pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Bosco Rama <postgres@boscorama.com>
To: Bosco Rama <postgres@boscorama.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: gcc _Decimal types & ecpg
Date: Sun, 14 Dec 2008 09:30:00 -0800
Message-ID: <49454298.3020202@boscorama.com> (raw)
In-Reply-To: <20081214122646.GB30170@feivel.credativ.de>
References: <4941F4FB.1080902@boscorama.com>
<20081214122646.GB30170@feivel.credativ.de>
Hi Michael,
Michael Meskes wrote:
> On Thu, Dec 11, 2008 at 09:22:03PM -0800, Bosco Rama wrote:
>> I was wondering if ecpg from Postgresql 8.3.5 is able to handle the gcc4 _Decimal32,
>> _Decimal64 & _Decimal128 intrinsic data types as transparently as the other types?
>> Or do they just end up getting treated as simple C float/double?
>
> To be honest I haven't heard/thought about these datatypes before. Could you
> give me a pointer where to find more information? Are these types similar to
> our decimal/numeric types?
These are the Decimal Floating Point types with storage bit-widths of 32, 64, 128.
They are part of the IEEE-754 2008 spec and have been added to the C99 spec as an
extension and have been in gcc since early in the 4 series. The GCC docs don't
have much on this:
<http://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html;
But these guys do: <http://speleotrove.com/decimal;
I don't know how closely it would match your decimal/numeric types internally but
I believe you could specify matching NUMERIC(x,y) declarations for them.
> The parser does not recognize these type keywords. So yes, atm they have to be treated
> as float/double.
I wonder if there will be conversion/cast issues with that? I'll have to look
closer to find out. We may just end us storing them as text/varchar.
Thanks.
Bosco.
view thread (3+ messages)
Message-ID: <49454298.3020202@boscorama.com>
Permalink: ../49454298.3020202@boscorama.com/
Also on: postgresql.org/message-id/49454298.3020202@boscorama.com
reply
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: postgres@boscorama.com
Subject: Re: gcc _Decimal types & ecpg
In-Reply-To: <49454298.3020202@boscorama.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