Re: 回复: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: 回复: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.
Дата
Msg-id Z__eIEU2vKvisr5Z@momjian.us
обсуждение исходный текст
Ответ на 回复: BUG #18892: When the view already exists, CREATE OR REPLACE VIEW does not check whether the table exists.  (Gang Chen <gchen@s2now.com>)
Список pgsql-bugs
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.



В списке pgsql-bugs по дате отправления: