Ennio-Sr <nasr.laili@tin.it> writes:
> after upgrading from pg_7.4 to pg_8.3 when I run this command:
> psql finanza -c "SELECT titolo, var, pr_chius, pr_aper, \
> diff_aper_ch*(-1) as \"diff. ass.\", \
> to_number(diff_aper_ch*(-1)/pr_aper*100::float(8),'9999.000000') as \"sc. %\" \
to_number works on text arguments. I suppose you could make this work
like 7.4 by explicitly casting the expression to text, but the whole
thing seems like the wrong approach altogether. What are you trying to
accomplish --- round the result to six decimal places? If so, it'd be
better to just cast it to numeric(20,6) or some such.
regards, tom lane