From: | Jaime Casanova <systemguards(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | rewriter in updateable views |
Date: | 2005-03-18 22:12:56 |
Message-ID: | c2d9e70e050318141255555d13@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Bernd and myself are working in updateable views, one thing we find is
that when we have something like:
create table foo (
col1 serial,
col2 text default 'default'
);
create view vfoo as select * from foo;
then we create the appropiate rules for allow INSERT /UPDATE /DELETE on the view
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.
Can you comment on this? Are there any issues here we have not seen
yet? performance? possible?
regards,
Jaime Casanova
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2005-03-18 22:35:40 | Re: GUC variable for setting number of local buffers |
Previous Message | Dave Page | 2005-03-18 20:04:22 | Re: [HACKERS] "they only drink coffee at dec" |