Обсуждение: Recursive reference of view in view defination crashes postmaster.

Поиск
Список
Период
Сортировка

Recursive reference of view in view defination crashes postmaster.

От
Rajesh Kumar Mallah
Дата:

My mistake i faced this problem below.
is it taken care in 7.4dev ?

the problem has no significance in real
world though.

Regds
mallah.


tradein_clients=# SELECT * from t_a;
 userid |   username
--------+---------------
 105989 | afri4ta
 105557 | koreantraders
  89773 | NQChinh
  89800 | yndvijaya
 113306 | giriraj
  89831 | devipriya
 105252 | info684
  89990 | hilco
  89729 | wangxiuqing
 104208 | zq7410
(10 rows)

tradein_clients=# CREATE VIEW t_b AS SELECT * from t_a;
CREATE VIEW
tradein_clients=# CREATE or replace view t_b AS select * from t_b;
CREATE VIEW
tradein_clients=#
tradein_clients=#
tradein_clients=#
tradein_clients=# \d t_b
              View "public.t_b"
  Column  |         Type          | Modifiers
----------+-----------------------+-----------
 userid   | integer               |
 username | character varying(30) |
View definition: SELECT t_b.userid, t_b.username FROM ONLY t_b;

tradein_clients=#
tradein_clients=# SELECT * from t_b;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#
!# \q

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

Re: Recursive reference of view in view defination crashes

От
Stephan Szabo
Дата:
On Fri, 27 Jun 2003, Rajesh Kumar Mallah wrote:

> My mistake i faced this problem below.
> is it taken care in 7.4dev ?

In 7.4 I get
"ERROR:  Infinite recursion detected in rules for relation t_b"

> tradein_clients=# CREATE VIEW t_b AS SELECT * from t_a;
> CREATE VIEW
> tradein_clients=# CREATE or replace view t_b AS select * from t_b;
> CREATE VIEW