Can anyone tell me the query to check whether a string is a number(double precision). It should return true if the string is number. else it should return false.
con
I fixed the regular expression that a_horse_with_no_name has suggested.
SELECT '12.41212' ~ '^\d+(\.\d+)?$'; -- true SELECT 'Service' ~ '^\d+(\.\d+)?$'; -- false