sqlc
sqlc copied to clipboard
Querying Postgres Materialized Views Catalog: relation "pg_matviews" does not exist
Version
1.26.0
What happened?
A bug happened! Running:
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
sqlc generate
errors with:
relation "pg_matviews" does not exist.
tried :exec
, :many
as well in terms of the sqlc
annotations. sqlc vet
returns the same error.
prior art:
- https://github.com/sqlc-dev/sqlc/pull/1044
- https://github.com/sqlc-dev/sqlc/issues/1021
- https://github.com/sqlc-dev/sqlc/pull/1509
versions:
❯ sqlc version
v1.26.0
Relevant log output
No response
Database schema
No response
SQL queries
-- name: ListMatViews :execresult
SELECT schemaname AS schema_name,
matviewname AS view_name,
matviewowner AS owner,
ispopulated AS is_populated,
definition
FROM pg_matviews
ORDER BY schemaname,
matviewname;
Configuration
No response
Playground URL
https://play.sqlc.dev/p/0eae0cbbe4f0c8bd76da5385dfb3e69a9196f6bad0b01ace20a669b9621274a2
What operating system are you using?
macOS ARM M1
What database engines are you using?
PostgreSQL
SELECT version();
PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
What type of code are you generating?
Go
❯ go version
go version go1.22.3 darwin/arm64