I think the easiest way would be a regular expression match:
select '12.41212' ~ '^[0-9\.]+$'
=> true
select 'Service' ~ '^[0-9\.]+$'
=> false
More Related Contents:
- What is PostgreSQL equivalent to autoincrement?
- How do I specify a password to ‘psql’ non-interactively?
- INSERT with dynamic table name in trigger function
- psql: FATAL: Ident authentication failed for user “postgres”
- How to find table creation time?
- What is the format for the PostgreSQL connection string / URL?
- Go and IN clause in Postgres
- Where does PostgreSQL store the database?
- Is there a way to disable function overloading in Postgres
- Grant all on a specific schema in the db to a group role in PostgreSQL
- Can I make a plpgsql function return an integer without using a variable?
- Migrate database from Postgres to MySQL [closed]
- How can I start PostgreSQL on Windows?
- PostgreSQL – max number of parameters in “IN” clause?
- Can’t connect the postgreSQL with psycopg2
- How do you change the character encoding of a postgres database?
- Difference between GiST and GIN index
- Test for null in function with varying parameters
- PostgreSQL: Why psql can’t connect to server?
- Postgres error on insert – ERROR: invalid byte sequence for encoding “UTF8”: 0x00
- Can I use return value of INSERT…RETURNING in another INSERT?
- Changing a postgres containers server port in Docker Compose
- How do you find the disk size of a Postgres / PostgreSQL table and its indexes
- no pg_hba.conf entry for host
- PostgreSQL – disabling constraints
- PostgreSQL authentication method 10 not supported
- Postgres default sort by id – worldship
- Best way to install hstore on multiple schemas in a Postgres database?
- Loop through columns of RECORD
- How to drop PostgreSQL database through command line [closed]