| От | Scott Marlowe |
|---|---|
| Тема | Re: Question about NOT NULL and default values. |
| Дата | |
| Msg-id | dcc563d10810162105m5e44b72fke9fcde4d96dc6288@mail.gmail.com обсуждение |
| Ответ на | Re: Question about NOT NULL and default values. (Stephan Szabo <sszabo@megazone.bigpanda.com>) |
| Ответы |
Re: Question about NOT NULL and default values.
|
| Список | pgsql-general |
On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo <sszabo@megazone.bigpanda.com> wrote: > On Fri, 17 Oct 2008, Tim Uckun wrote: > >> Is there a way to change this behavior so that an attempt to set the >> column to NULL will result in the default value being put in the >> field? > > I don't think so specifically with default, but you could use a before > trigger instead that would put in a value in the new row if NULL was > given. I'm pretty sure that will fail as the primary key or not null constraint comes first.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера