how do I CHECK 'field only contains characters 0-9 or space?' - Mailing list pgsql-novice

From Tom Strickland
Subject how do I CHECK 'field only contains characters 0-9 or space?'
Date
Msg-id 20010325125237.W848@lyra.coulter
Whole thread Raw
Responses Re: how do I CHECK 'field only contains characters 0-9 or space?'
List pgsql-novice
The subject says it all really. I have a phone no. field of type
VARCHAR(15) and would like to add a check that says 'only allow
numbers or the space character in this field'. Can I do this with a
CHECK (and if so how?) or do I need a trigger?

Thanks,
Tom

pgsql-novice by date:

Previous
From: Frank Hilliard
Date:
Subject: PostgreSQL/CF Guestbook
Next
From: Lars Forseth
Date:
Subject: On Postgres and permissions, cant read a file into a table