Re: Update through views?
От | Tom Lane |
---|---|
Тема | Re: Update through views? |
Дата | |
Msg-id | 14398.984005356@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Update through views? (dev@archonet.com) |
Ответы |
Re: Update through views?
|
Список | pgsql-general |
dev@archonet.com writes: > Nope - and I'm not sure how Postgres is ever going to figure out how to > update/insert on a view in the general case. The view might use UNION, > GROUP BY and CASE and effectively be read-only. I can guarantee that we won't ever support these things on an arbitrary view; there'll always be a need for hand-made rules in cases where the system is too dumb to figure out a plausible rule for updating a view, but the programmer knows what he wants to have happen. The SQL spec calls out a set of conditions for a view being "updatable", which essentially means that the view is simple enough that a DBMS should be able to derive update rules for it automatically. At some point we'll probably try to build machinery to implement automatic rule creation for those sorts of views. But it'll always be possible to write your own rules if you don't like the automatic ones or the view is too complex for automatic rule creation. regards, tom lane
В списке pgsql-general по дате отправления: