How to setup a column constraint for an integer type? Default 0 if not defined

Поиск
Список
Период
Сортировка
От Wang, Mary Y
Тема How to setup a column constraint for an integer type? Default 0 if not defined
Дата
Msg-id FA20D4C4FEBFD148B1C0CB09913825FC0457D933D9@XCH-SW-06V.sw.nos.boeing.com
обсуждение исходный текст
Ответы Re: How to setup a column constraint for an integer type? Default 0 if not defined  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
Hi,


I'm trying to port some source code to Postgres 8.3.8 and have been encountering some surprises :-(
I would like to set up a column constraint for an integer type, so that when the value is undefined, it would assign a
defaultvalue of 0 to that column. 
How would I do that in 8.3.8?  Please provide an example.

Mary






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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [GENERAL] Postgres 9.1 - Release Theme
Следующее
От: John R Pierce
Дата:
Сообщение: Re: How to setup a column constraint for an integer type? Default 0 if not defined