Re: Materialized views WIP patch

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Materialized views WIP patch
Дата
Msg-id 20121119165633.156400@gmx.com
обсуждение исходный текст
Ответ на Materialized views WIP patch  ("Kevin Grittner" <kgrittn@mail.com>)
Ответы Re: Materialized views WIP patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Simon Riggs wrote:

> This seems very similar to the REPLACE command we discussed
> earlier, except this is restricted to Mat Views.

I don't remember that discussion -- do you have a reference?

> If we're going to have this, I would prefer a whole command.
> 
> e.g. REPLACE matviewname REFRESH
> 
> that would also allow
> 
> REPLACE tablename AS query
> 
> Same thing under the covers, just more widely applicable and thus
> more useful.

An interesting throught. I would have thought that if we were going
to allow changing the definition of an existing MV, we would be
better off with CREATE OR REPLACE MATERIALIZED VIEW. Either way, if
you allow the column types or the number of columns to be changed,
you do tend to run into issues if there are other MVs, views,
triggers, rules, etc., which depend on the MV, so I don't think it's
material for an initial patch. But it is worth considering which way
we might want to extend it.

> Either way, I don't much like overloading the use of LOAD, which
> already has a very different meaning.

Well, it's hard to avoid creating new keywords without overloading
the meaning of exsiting ones. Personally I didn't find
 LOAD MATERIALIZED VIEW matview_name;

to be very easy to confuse with
 LOAD 'filename';

But that's a subjective thing. If too many people find that
confusing, it may be worth creating a new keyword; but I wanted to
see whether it was really necessary first.

-Kevin



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Enabling Checksums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [RFC] Fix div/mul crash and more undefined behavior