| От | Greg Stark |
|---|---|
| Тема | Re: effective SELECT from child tables |
| Дата | |
| Msg-id | 87oe667yq0.fsf@stark.xeocode.com обсуждение исходный текст |
| Ответ на | Re: effective SELECT from child tables (Hannu Krosing <hannu@skype.net>) |
| Список | pgsql-hackers |
Hannu Krosing <hannu@skype.net> writes: > Probably a different syntax would be better here, perhaps > > ALTER TABLE ADD foo integer AS 1 WHEN MISSING; > > or somesuch. Uhm, if you're adding the column they're *all* "missing". That's the whole point. If you start inventing a new user-visible concept "missing" and try to distinguish it from NULL you're going to have a hell of a time defining the semantics. The goal has to be to provide the *exact* same user-visible semantics as actually setting the default. That means setting all the existing rows if you're adding a new column. It also unfortunately means tackling the much trickier gotcha that Tom raised about what happens if you want to later change the default. -- greg
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера