how do I CHECK 'field only contains characters 0-9 or space?'

Поиск
Список
Период
Сортировка
От Tom Strickland
Тема how do I CHECK 'field only contains characters 0-9 or space?'
Дата
Msg-id 20010325125237.W848@lyra.coulter
обсуждение исходный текст
Ответы Re: how do I CHECK 'field only contains characters 0-9 or space?'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Frank Hilliard
Дата:
Сообщение: PostgreSQL/CF Guestbook
Следующее
От: Lars Forseth
Дата:
Сообщение: On Postgres and permissions, cant read a file into a table