| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Don't cascade drop to view |
| Дата | |
| Msg-id | 20080117174500.GA21761@svana.org обсуждение |
| Ответ на | Re: Don't cascade drop to view (Erik Jones <erik@myemma.com>) |
| Список | pgsql-general |
On Thu, Jan 17, 2008 at 11:10:25AM -0600, Erik Jones wrote: > If you dropped tables out from under views, how would you expect them > to act if someone were to query them? Inconsistent and unpredictable > are just two words I'd use to describe a system that allowed that. I'd expect it to throw an error that the tables are missing. I ran into this today. All it really requires is that the view definition be parsed at use time rather than at creation time. > However, if these are relatively simple views, you may be able to get > away with re-implementing them as functions that return sets of > whatever record type your views are. As you say, functions are compiled at use time, and hence don't suffer this problem. You can build a view on the function and it should be transparent... Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution inevitable. > -- John F Kennedy
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера