IP Address Validation - Mailing list pgsql-general

From Jasbinder Singh Bali
Subject IP Address Validation
Date
Msg-id a47902760705092122s27acbe81h449ffac1676089ec@mail.gmail.com
Whole thread Raw
Responses Re: IP Address Validation
List pgsql-general
Hi,
I need to check whether the input string is in ip address format or not in one of my pl/pgsql functions.
What function should be used to accomplish this

I tried using
if inet(strInput)

However, it throws an exception if the input string is not in IP address format.

I could have caught this exception but really don't know what type of exception category would this exception come under..

Any kind of help would be highly appreciated.

Thanks,

Jas

pgsql-general by date:

Previous
From: Brent Wood
Date:
Subject: Re: Views- Advantages and Disadvantages
Next
From: David Wall
Date:
Subject: Re: Replication for PG 8 recommendations