Why no CREATE TEMP MATERIALIZED VIEW ?
Hello,
Out of curiosity, since there's CREATE TEMP VIEW, any particular reason
there's no CREATE TEMP MATERIALIZED VIEW?
Seems like it could be similar to a temp table.
On Tue, Jul 16, 2019 at 9:29 AM Ivan Voras <ivoras@gmail.com> wrote:
Out of curiosity, since there's CREATE TEMP VIEW, any particular reason
there's no CREATE TEMP MATERIALIZED VIEW?Seems like it could be similar to a temp table.
Probably a lack (absence) of use cases resulted in people deciding (or
defaulting) to not spend any effort in that area. Incremental maintenance
and refresh seem considerably less useful when only the current session can
see the table. Temp views and temp tables seem to provide sufficient
options in the session lifetime space.
David J.
On 7/16/19 11:56 AM, David G. Johnston wrote:
On Tue, Jul 16, 2019 at 9:29 AM Ivan Voras <ivoras@gmail.com
<mailto:ivoras@gmail.com>> wrote:Out of curiosity, since there's CREATE TEMP VIEW, any particular
reason there's no CREATE TEMP MATERIALIZED VIEW?Seems like it could be similar to a temp table.
Probably a lack (absence) of use cases resulted in people deciding (or
defaulting) to not spend any effort in that area. Incremental maintenance
and refresh seem considerably less useful when only the current session
can see the table. Temp views and temp tables seem to provide sufficient
options in the session lifetime space.
How different is a "*temp* materialized view" from a regular view?
--
Angular momentum makes the world go 'round.
How different is a "*temp* materialized view" from a regular view?
If it existed, it would be useful for cases when you need to reference that
view in multiple queries in the same session. I've gotten around this by
just using temp tables.
On 2019-Jul-16, Ivan Voras wrote:
Hello,
Out of curiosity, since there's CREATE TEMP VIEW, any particular reason
there's no CREATE TEMP MATERIALIZED VIEW?
Because it hasn't been implemented. There is a patch, but it's not
done. See this thread:
/messages/by-id/CAKLmikNoQR4ZNg_wt=-hU-uUxV2cXVdveeRsMFjr2SAopVxDxw@mail.gmail.com
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services