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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly