Created
January 28, 2014 15:08
-
-
Save hschnegg/8669277 to your computer and use it in GitHub Desktop.
PostgreSQL: Test if text can be cast to numeric
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment