Re: WIP: Automatic view update rules

From: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
To: "Bernd Helmle" <mailings(at)oopsware(dot)de>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Automatic view update rules
Date: 2008-12-25 17:43:21
Message-ID: 3073cc9b0812250943x23547116ud956d8ab111e55bf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 22, 2008 at 8:53 AM, Bernd Helmle <mailings(at)oopsware(dot)de> wrote:
> --On Mittwoch, November 26, 2008 10:54:01 +0100 Bernd Helmle
> <mailings(at)oopsware(dot)de> wrote:
>
> Okay, i've finally managed to create an updated version with (hopefully) all
> issues mentioned by Robert adressed.
>

Hi Bernd,

1) i found a crash type bug, try this:

create table foo (
id integer not null primary key,
name varchar(30)
) with oids;

create view foo_view as select oid, * from foo;

with this you will get an error like this one:
ERROR: RETURNING list's entry 1 has different type from column "oid"

but if you make this:

alter table foo add column description text;
create view foo_view as select oid, * from foo;

then, the server crash.

STATEMENT: create or replace view v_foo as select oid, * from foo;
LOG: server process (PID 16320) was terminated by signal 11: Segmentation fault
LOG: terminating any other active server processes

maybe the better solution is to not allow such a view to be updatable

2) Another less important bug, the WITH CHECK OPTION is accepted even
when that functionality is not implemented.

updatable_views=# create or replace view v2 as select * from foo where
id < 10 with check option;
NOTICE: CREATE VIEW will create implicit INSERT/UPDATE/DELETE rules
CREATE VIEW

3) one final point: seems like you'll have to update the rules
regression test (attached the regression.diffs)

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

Attachment Content-Type Size
regression.diffs application/octet-stream 13.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2008-12-25 18:43:56 Re: [idea] a copied relkind in pg_attribute
Previous Message Robert Haas 2008-12-25 15:47:57 Re: Proposed Patch to Improve Performance of Multi-BatchHash Join for Skewed Data Sets