reformatting floats ? - Mailing list pgsql-general

From Gauthier, Dave
Subject reformatting floats ?
Date
Msg-id D7FF158337303A419CF4A183F48302D6037049E7@hdsmsx411.amr.corp.intel.com
Whole thread Raw
Responses Re: reformatting floats ?
Re: reformatting floats ?
List pgsql-general

Hi:

 

if...  

create table coords (id int, x float, y float);

then... 

insert into coords (id,x,y) values (1,1.000,2.001)

and then...

            select * from coords

i get...

            1,1,2.001

i want...

            1.1.000,2.001

while retaining the numeric nature of the x,y data (for math ops in other operations).

 

How can I reformat the float output (sort of like using “%5.3f” in good-ole C)

 

Thanks !

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: record-based log shipping
Next
From: Martijn van Oosterhout
Date:
Subject: Re: reformatting floats ?