Re: NULL becomes default
| От | Julian Scarfe |
|---|---|
| Тема | Re: NULL becomes default |
| Дата | |
| Msg-id | 0cb101c6c444$44867300$0600a8c0@Wilbur обсуждение исходный текст |
| Ответ на | NULL becomes default ("Julian Scarfe" <julian@avbrief.com>) |
| Ответы |
Re: NULL becomes default
|
| Список | pgsql-sql |
>> Thus I would like NULLs in such INSERTs to be treated as DEFAULT rather >> than violating the constraint. Is there an easy way to do that at the >> database level? From: "Markus Schaber" <schabi@logix-tt.com> > Did you try a "before insert" trigger that checks new_id for null > values, and replaces it with nextval()? So thinking about this a little more, it requires me to be able to change a column value to DEFAULT (unless I implement the default from scratch in the trigger, but that feels messy). I don't have much experience of triggers: can I do that? Thanks Julian
В списке pgsql-sql по дате отправления: