Re: rewriter in updateable views - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: rewriter in updateable views
Date
Msg-id c2d9e70e0503190926201f0267@mail.gmail.com
Whole thread Raw
In response to Re: rewriter in updateable views  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, 19 Mar 2005 11:05:39 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jaime Casanova <systemguards@gmail.com> writes:
> > On Fri, 18 Mar 2005 23:31:26 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> 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"?
> >>
> > Well, that was our first thought. but what if the default value is
> > changed in the base table?
> 
> So?  Being able to have a different default for the view could be
> construed as a feature, not a bug.
> 
>                         regards, tom lane
> 
We are not against this. As you say this is a feature, but if the view
doesn't have a default value we have to assign something in the
appropiate col in the insert.

ALTER TABLE view_name ALTER COLUMN ADD/DROP DEFAULT is your friend ;)

regards,
Jaime Casanova


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: rewriter in updateable views
Next
From: Tom Lane
Date:
Subject: GUC variable for setting number of local buffers