Re: rewriter in updateable views

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: rewriter in updateable views
Date: 2005-03-19 06:10:11
Message-ID: c2d9e70e0503182210712d98c6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 18 Mar 2005 23:31:26 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jaime Casanova <systemguards(at)gmail(dot)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
>
Well, that was our first thought. but what if the default value is
changed in the base table? then we have a problem, can we found in
what views we have to alter the default value in order to keep
consistency.

regards,
Jaime Casanova

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-03-19 11:42:18 Re: rewriter in updateable views
Previous Message Tom Lane 2005-03-19 04:31:26 Re: rewriter in updateable views