> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Joshua D. Drake
> 
> > oms=# select round(1.25::decimal, 2);
> >  round
> > -------
> >   1.25
> > (1 row)
> > 
> > BUT.............
> > 
> > DB=# select round(1.25::float, 2);
> 
> 
> select round(1.25::numeric, 2);

Yeah I know, but in the interest of portability, I have to use the full-on
SQL cast (cast(1234.123 as numeric)).  Besides, I'd have to fix (for lack of
a better word) piles of queries.

This popped up because we're doing dev work against a 7.4 server but
deploying against a 7.2 server.  To make matters worse, here's one of the
errors we get on 7.2 after doing the casts and re-deploying:

DB=# select 1234::numeric > 1234::float;
ERROR:  Unable to identify an operator '>' for types 'numeric' and 'double
precision'
        You will have to retype this query using an explicit cast

Again, WTF???  Since this is on 7.2 (and fixed on >= 7.3), I'm not too
worried about it, but it, too, is quite broken.

The result is that development work is suddenly a big pain in the a$$ where
these queries are concerned.  I'm considering Postgres to be broken.  Am I
wrong?  Is there an actual reason for this behavior?

Thx again,
Glen Parker
[EMAIL PROTECTED]


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to