| От | frbn |
|---|---|
| Тема | Re: help please |
| Дата | |
| Msg-id | 3D75D12C.6030001@efbs-seafrigo.fr обсуждение исходный текст |
| Ответ на | help please ("Dorward Villaruz" <dorwardv@ntsp.nec.co.jp>) |
| Ответы |
clog problem
|
| Список | pgsql-general |
Dorward Villaruz a écrit: > i need to create a table with this property > > > the fields are f1 integer , f2 integer , f3 integer defaults to f1 + f2 you shouldn't store f1+f2, as you already store f1 and f2. > i have created something like this > > > create table table1(a integer not null unique primary key, b integer not > null, c not null default a + b) "you can't use attributes in the default clause" if you *really* want to do that, use a trigger after insert: update f3 with f1+f2
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера