astrocrack
4/6/2017 - 8:24 AM

PostgreSQL: Test if text can be cast to numeric

PostgreSQL: Test if text can be cast to numeric

select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$');