Carsten Klein <c.kl...@datagis.com> writes:
> So, you're not aware of any ways this behavior could be achieved from 
> within PostgreSQL? Something like a custom cast (actually, there is 
> none) or something that could intercept string to double conversion? 

Well, you asserted that these installations are all alike ... but
sure, it's conceivable that somebody could've replaced the default
numeric -> float8 cast (i.e., numeric_float8()) with some other code
that does it a bit inaccurately.  There's only a pg_cast entry
connecting that function to those types.  Have you tried stepping
through things with a debugger, to see if numeric_float8 and float8in
are actually reached on the problematic system?

> That would be something to look at closer. The question is: how would 
> you implement such an evil database wide text to double conversion (just 
> to kid users) if you had to?

At the SQL level, your example does not involve text -> double.
The literal 1.56 is of type numeric.

                        regards, tom lane


Reply via email to