You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While playing around with Postgres Materialized Views I noticed that support for querying them was added in #1509 but I can't find a way to refresh them using sqlc.
I'd expect the following query to generate a method just like any exec annotation would:
Looking at the source code, it seems like ast.RefreshMatViewStmt is already being parsed but ignored as an unsupported statement. Is there any other way to refresh a Materialized View without falling back to the raw database connection or could support for this query be added to sqlc?
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go
The text was updated successfully, but these errors were encountered:
You can do this today by putting the tasks like refresh view inside of a function like this.
CREATE OR REPLACE FUNCTION public.refresh_views()
RETURNS boolean
LANGUAGE plpgsql
AS $$
BEGIN
REFRESH MATERIALIZED VIEW foo_view;
RETURN true;
END
$$;
If I was maintaining this project, I'd want to avoid adding features that have reasonable alternate implementations to ensure the project could stay focused. This seems reasonable to me.
What do you want to change?
While playing around with Postgres Materialized Views I noticed that support for querying them was added in #1509 but I can't find a way to refresh them using sqlc.
I'd expect the following query to generate a method just like any
exec
annotation would:-- name: RefreshFooView :exec REFRESH MATERIALIZED VIEW foo_view;
Looking at the source code, it seems like
ast.RefreshMatViewStmt
is already being parsed but ignored as an unsupported statement. Is there any other way to refresh a Materialized View without falling back to the raw database connection or could support for this query be added to sqlc?What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go
The text was updated successfully, but these errors were encountered: