Re: Using rules to implement backward-compatible schema changes
В списке pgsql-sql по дате отправления:
| От | Mario Becroft |
|---|---|
| Тема | Re: Using rules to implement backward-compatible schema changes |
| Дата | |
| Msg-id | 87y7baouxy.fsf@server.ak.quickcircuit.co.nz обсуждение |
| Ответ на | Re: Using rules to implement backward-compatible schema changes (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-sql |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Mario Becroft <pgsql@becroft.co.nz> writes: >> The problem is that when inserting to the view, default values do not >> work as expected. > > You need to attach the defaults to the view, viz > > ALTER TABLE a ALTER COLUMN bar SET DEFAULT 5; > > This is considered a feature not a bug, since you might want a > different default for inserts to the view than for inserts > directly to the underlying table. This crossed my mind, but I could not find a way of specifying defaults for a view. I see now that it must be done with ALTER TABLE. Thanks for your help with this problem. -- Mario Becroft (postgres-related mail) <pgsql@becroft.co.nz>
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера