Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

Поиск
Список
Период
Сортировка
От Yugo NAGATA
Тема Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW
Дата
Msg-id 20240807040629.b163af0f74355ef7276cc51c@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Tue, 06 Aug 2024 11:24:03 -0700
Jeff Davis <pgsql@j-davis.com> wrote:

> On Wed, 2024-08-07 at 03:06 +0900, Yugo Nagata wrote:
> > I'm sorry. After sending the mail, I found the patch didn't work.
> > If we call RestrictSearchPath() before creating a relation, it tries
> > to create the relation in pg_catalog and it causes an error.
> 
> Yeah, that's exactly the problem I ran into in ExecCreateTableAs(),
> which was the reason I refactored it to use RefreshMatViewByOid().

I came up with an idea that we can rewrite into->rel to add the
current schemaname before calling RestrictSearchPath() as in the
attached patch.

It seems a simpler fix at least, but I am not sure whether this design
is better than using RefreshMatViewByOid from EXPLAIN considering
to support EXPLAIN REFRESH ...

Regards,
Yugo Nagata

-- 
Yugo NAGATA <nagata@sraoss.co.jp>

Вложения

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