Re: Isnumeric function?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: olly(at)lfix(dot)co(dot)uk, Theo Galanakis <Theo(dot)Galanakis(at)lonelyplanet(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Isnumeric function?
Date: 2004-09-08 16:47:17
Message-ID: 200409080947.17682.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Oliver, Theo:

> ~ '^[0-9]+$'

Actually, I usually do:

~ '^[0-9]+\.?[0-9]*$'

... to include decimals. However, the above assumes that there is at least a
"0" before the decimal; it would be nice to adapt it to matching a leading
decimal (i.e. .057 ) as well. Can't see any easy way, though ...

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2004-09-08 17:05:00 Re: [SQL] How to rename a constraint/trigger??
Previous Message Thomas Wegner 2004-09-07 23:38:37 SQL99 "with recursive" question