From: Bruce Momjian <bruce@momjian.us>
To: Gang Chen <gchen@s2now.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: 回复: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.
Date: Wed, 16 Apr 2025 12:43:12 -0400
Message-ID: <Z__eIEU2vKvisr5Z@momjian.us> (raw)
In-Reply-To: <KL1PR03MB80701C89409607AF0B339330E5B32@KL1PR03MB8070.apcprd03.prod.outlook.com>
References: <18892-dc187cc800710924@postgresql.org>
<CAKFQuwaczG7zLiutpk7WzZc-8v2avugcbNq0OcLZbk+0EutWSA@mail.gmail.com>
<KL1PR03MB80701C89409607AF0B339330E5B32@KL1PR03MB8070.apcprd03.prod.outlook.com>
On Mon, Apr 14, 2025 at 08:55:04AM +0000, Gang Chen wrote:
> Hello,
>
> But isn't that kind of strange? If it's just a very simple view, first of all,
> referencing itself would result in an infinite recursion error. Also, it
> doesn't seem to have any practical use. Secondly, during pg_upgrade or backup
> and restore processes, it might introduce unnecessary errors and additional
> handling procedures.
You are right, but disallowing only that setup would be confusing. To
keep the user interface simple, we should either allow a general class
of things or disallow them.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, gchen@s2now.com, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: 回复: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.
In-Reply-To: <Z__eIEU2vKvisr5Z@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox