mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Create a distinction between a populated matview and a scannable one.
The intent was that being populated would, long term, be just one of the conditions which could affect whether a matview was scannable; being populated should be necessary but not always sufficient to scan the relation. Since only CREATE and REFRESH currently determine the scannability, names and comments accidentally conflated these concepts, leading to confusion. Also add missing locking for the SQL function which allows a test for scannability, and fix a modularity violatiion. Per complaints from Tom Lane, although its not clear that these will satisfy his concerns. Hopefully this will at least better frame the discussion.
This commit is contained in:
@ -417,7 +417,7 @@ intorel_startup(DestReceiver *self, int operation, TupleDesc typeinfo)
|
||||
|
||||
if (into->relkind == RELKIND_MATVIEW && !into->skipData)
|
||||
/* Make sure the heap looks good even if no rows are written. */
|
||||
SetRelationIsScannable(intoRelationDesc);
|
||||
SetMatViewToPopulated(intoRelationDesc);
|
||||
|
||||
/*
|
||||
* Check INSERT permission on the constructed table.
|
||||
|
Reference in New Issue
Block a user