Assume we have a distributed CitusDB table named customer_reviews
, and we try to create a view on it:
CREATE VIEW book_reviews AS
(SELECT * FROM customer_reviews WHERE product_group = 'Book');
This appears to work. But if we run:
SELECT COUNT(1) FROM book_reviews;
CitusDB gives the following error:
ERROR: cannot plan queries that include both regular and partitioned relations
Two questions:
- Is there a way to work around this by manually creating the view on all worker nodes?
- Is there a way to make
CREATE VIEW
andDROP VIEW
work correctly on the master node, for apps which create and destroy views automatically at runtime?