Re: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists. - Mailing list pgsql-bugs

From Kirill Reshke
Subject Re: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.
Date
Msg-id CALdSSPgvZmd=Bc1n8CCuFws1uEmejbKeSQ-UpNoVyQ6AceCu7A@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.
List pgsql-bugs
On Sun, 13 Apr 2025 at 00:33, David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> Kirill's answer is correct; though it is a bit annoying that "create view" cannot detect the infinite recursion
inherentin its body.
 
>
> David J.
>

Hm, if we can detect infinite recursion at runtime, we should also be
able to do it definition-time, on "create or replace". Is there any
reason we omit such a check (for recursive views/relations) when
executing ddl?

-- 
Best regards,
Kirill Reshke



pgsql-bugs by date:

Previous
From: Robins Tharakan
Date:
Subject: Re: BUG #18893: Segfault during analyze pg_database
Next
From: Tom Lane
Date:
Subject: Re: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.