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 17:26:24
Message-ID: c2d9e70e0503190926201f0267@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 19 Mar 2005 11:05:39 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jaime Casanova <systemguards(at)gmail(dot)com> writes:
> > On Fri, 18 Mar 2005 23:31:26 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-19 17:57:45 GUC variable for setting number of local buffers
Previous Message Jaime Casanova 2005-03-19 17:23:33 Re: rewriter in updateable views