Re: rewriter in updateable views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: rewriter in updateable views
Дата
Msg-id 12486.1111206686@sss.pgh.pa.us
обсуждение исходный текст
Ответ на rewriter in updateable views  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: rewriter in updateable views  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-hackers
Jaime Casanova <systemguards@gmail.com> writes:
> ... but if we do INSERT INTO vfoo(col2) values ('some_string) the rewriter
> cann resolv the value for col1. the reason is that views does not
> inherit the defaults of the parent table. That is the reason you add
> the ALTER TABLE  ALTER COLUMN ADD/DROP DEFAULT for views.

> Ok, this is a problem for us, so we want to improve the rewriter to
> see the default in the base table an add it as appropiate.

Why do you not define the problem as "when we decide a view is
updateable and create the needed rules for it, also create default
values for it by copying up from the base tables"?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: read-only planner input
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: rewriter in updateable views