Re: Validating Whole Numbers - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: Validating Whole Numbers
Date
Msg-id 3C83F5B0.58598EB6@nsd.ca
Whole thread Raw
In response to Validating Whole Numbers  ("Krog, Kenneth" <KAKrog@MassMutual.com>)
List pgsql-general
How about:

WHERE x ~ '^[0-9]*$'


"Krog, Kenneth" wrote:
>
> Is there a quick way to validate whole numbers for instance you can validate
> a number
>
> if (is_numeric($x)
> {
> output
> }
> else
> {
> output
> }
>
> Thanks in advance
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

pgsql-general by date:

Previous
From: "Andrew Bartley"
Date:
Subject: Re: postgre performance question
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: counting words in a text or char varying field