Thread: BUG #1750: recurrentive views terminates connection

BUG #1750: recurrentive views terminates connection

From
"Bartłomiej Rychtarski"
Date:
The following bug has been logged online:

Bug reference:      1750
Logged by:          Bartłomiej Rychtarski
Email address:      bartek@wsb.poznan.pl
PostgreSQL version: 7.3.4
Operating system:   red hat 9
Description:        recurrentive views terminates connection
Details:

selecting from recurrent views couses termination of all client connections
to the postgres server:

create view test1 as
select 1::integer as id;

create view test2 as
select sum(id) as id from test1;

create or replace view test1 as
select sum(id)::integer as id from test2;

select * from test2;

Re: BUG #1750: recurrentive views terminates connection

From
Tom Lane
Date:
"BartÅomiej Rychtarski" <bartek@wsb.poznan.pl> writes:
> PostgreSQL version: 7.3.4

> selecting from recurrent views couses termination of all client connections
> to the postgres server:

This is fixed in 7.4 and up.

regression=# select * from test2;
ERROR:  infinite recursion detected in rules for relation "test2"

            regards, tom lane