Skip site navigation (1) Skip section navigation (2)

bug? Coercing float8 to text sticks number in the middle of a date

From: Donald Jackson <jackson(at)cvrc-taco(dot)mgh(dot)harvard(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bug? Coercing float8 to text sticks number in the middle of a date
Date: 1999-06-02 23:08:47
Message-ID: l0311070db37b67d19062@[] (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The function:

CREATE FUNCTION zfin_comments(text) RETURNS text AS
'select lod::text || analysis_type::text
AS comments FROM markers WHERE marker_id = $1;'

The output:

ssr_db=> select marker_id, lod, analysis_type, zfin_comments(marker_id)
from markers;
marker_id|  lod|analysis_type|zfin_comments
Z8551    |19.27|final        |Fri Dec 31 19:00:19.27 1999 ESTfinal
Z8554    |13.72|final        |Fri Dec 31 19:00:13.72 1999 ESTfinal
Z8563    |18.96|final        |Fri Dec 31 19:00:18.96 1999 ESTfinal
Z8574    |18.96|final        |Fri Dec 31 19:00:18.96 1999 ESTfinal
Z8602    |20.77|final        |Fri Dec 31 19:00:20.77 1999 ESTfinal
Z8604    |17.79|final        |Fri Dec 31 19:00:17.79 1999 ESTfinal
Z8613    |17.16|final        |Fri Dec 31 19:00:17.16 1999 ESTfinal

Apparently, when I try to force the float8 value into text
it ends up as seconds in a datetime?  I looked for a function to convert
float to text, but found none...


Don Jackson

pgsql-bugs by date

Next:From: Mark WrightDate: 1999-06-07 16:51:29
Subject: Bug found in beta version
Previous:From: C. Arthur Venable IIIDate: 1999-06-02 15:18:13
Subject: 10% off custom web design

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group