From: | "Kevin Grittner" <kgrittn(at)mail(dot)com> |
---|---|
To: | "Simon Riggs" <simon(at)2ndQuadrant(dot)com> |
Cc: | "Josh Berkus" <josh(at)agliodbs(dot)com>,pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Materialized views WIP patch |
Date: | 2012-11-19 16:56:33 |
Message-ID: | 20121119165633.156400@gmx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-11-19 17:01:27 | Re: [RFC] Fix div/mul crash and more undefined behavior |
Previous Message | Robert Haas | 2012-11-19 16:48:52 | Re: Enabling Checksums |