Re: Where can I find detail information about constraint ?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Where can I find detail information about constraint ?
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C203937F34@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Where can I find detail information about constraint ?  (纪晓曦 <sheepjxx@gmail.com>)
Список pgsql-general
??? wrote:
> I want detail usage introduction about constraint,such as how 
> to constrain a string to be exactly 4 character and start with 'z'.
> Where can I find the reference of CHECK? detail usage.

Documentation:
http://www.postgresql.org/docs/current/static/ddl-constraints.html#AEN2254

The check you want would look similar to this:
CHECK (length(val) = 4 AND substr(val, 1, 1) = 'z')

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: Graphical representation of query plans
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to have ant's task insert special chars appropriately?