jmoiron / sqlx

general purpose extensions to golang's database/sql
http://jmoiron.github.io/sqlx/
MIT License
16.3k stars 1.09k forks source link

Cannot refresh postgres materialized view #935

Closed dmytrorudenko closed 3 months ago

dmytrorudenko commented 3 months ago
    // Refresh the materialized view
refreshQuery := `REFRESH MATERIALIZED VIEW <schema>."materialized_view_mv";`
_, err := s.db.Exec(refreshQuery)
if err != nil {
    return nil, fmt.Errorf("failed to refresh materialized view: %w", err)
}

This gets me next error: ERROR: relation \"materialized_view_mv\" does not exist (SQLSTATE 42P01)

github.com/jmoiron/sqlx v1.3.4 AWS RDS Aurora Postgresql, Engine version 12.16