Re: Decimal values in - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Decimal values in
Date
Msg-id 20140217155016.GN6342@eldon.alvh.no-ip.org
Whole thread Raw
In response to Decimal values in  (Masterprojekt Naumann1 <mpws2013n1@gmail.com>)
Responses Re: Decimal values in  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Masterprojekt Naumann1 escribió:
> Dear Dev-List,
> 
> inside execProcnode.c's ExecProcNode method we want to extract the value of
> a tuple for a specific attribute. This works great for integers and
> strings, but we are not able to figure out how to do this for floating
> point numbers. Below is some example code snippet to show our problem:

"DECIMAL_OID" (you probably mean NUMERICOID) points to datatype numeric,
which is not floating point but a variable length datatype with its own
special encoding for storage.  If you want floating point you need
FLOAT4OID and FLOAT8OID, and columns created with types float and
"double precision", respectively.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Do you know the reason for increased max latency due to xlog scaling?
Next
From: Andres Freund
Date:
Subject: Re: Do you know the reason for increased max latency due to xlog scaling?