Querying a materialized view: relation does not exist
I define a materialized view as such:
Then I query this materialized view:
But I get the error:
I'm using Neon.
Does Drizzle know how to create the materialized view for me?
3 Replies
hey @pax , I dont have the answer for ya. but you could create the view normally in your database, and then just add the .existing() at the end of your drizzle view declaration. (thats what i do for my views, and so that i have more control over it in writing the raw sql)
been running into the same problem, did you figure this out @pax ?
Views are not created with code (yet), the pgView and pgMaterializedView are simply ways to reference existing views in your database. It's not a bug, it's just code that has yet to be created within Drizzle