Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u55r7-00C7eA-7l for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2025 16:43:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u55r3-000nPM-K6 for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2025 16:43:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u55r3-000nP3-BF for pgsql-bugs@lists.postgresql.org; Wed, 16 Apr 2025 16:43:18 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u55r0-000QK2-2L for pgsql-bugs@lists.postgresql.org; Wed, 16 Apr 2025 16:43:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=vUiAhmy8S4EaGLlJwOHYBHxGFwOa/+bNax8wpgoU258=; b=RTc75 9qXbe+esNaOAAWvJFh3iVfXizla1mZpl1CHZKAhQcroTRZstO8eQ/pGeMdBH1x0wiwZ/S+CFN3CaD EePoM3cmFaDKb+bjcvLBpPmJmU+D9yholPY/qDB+6FI45A9GbgDHNEOotCAm9RtSV4yugAetpFa0V VyyqZjdsMLuj2wNpn00NK9TA3XsEsh6E9YBTImlXovwGsXkNwTjdCB999EStcNQ/AIvcYqPqGmBsF Khwg+yGphMCfm6kut8yP6Wkabq1xSKAlnxC49u/cJdCgn/Bzh74vp2WGJrutfZx2pNHdbRg6Uyy+l PslnIFgsal3ceMWyA7ws1WLdSgMBg==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1u55qy-0073vF-1c; Wed, 16 Apr 2025 12:43:12 -0400 Date: Wed, 16 Apr 2025 12:43:12 -0400 From: Bruce Momjian To: Gang Chen Cc: "David G. Johnston" , "pgsql-bugs@lists.postgresql.org" Subject: Re: =?utf-8?B?5Zue5aSNOiBCVUcgIzE4ODkyOiBX?= =?utf-8?Q?hen_the_view_already_exists=2C_CREAT?= =?utf-8?Q?E?= OR REPLACE VIEW does not check whether the table exists. Message-ID: References: <18892-dc187cc800710924@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.