reformatting floats ?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: reformatting floats ?
Date: 2007-12-06 18:22:55
Message-ID: D7FF158337303A419CF4A183F48302D6037049E7@hdsmsx411.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2007-12-06 18:29:51 Re: record-based log shipping
Previous Message SHARMILA JOTHIRAJAH 2007-12-06 17:30:36 record-based log shipping