Closed
Description
Version
1.21.0
What happened?
This query:
-- name: GetTables :many
SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND
schemaname != 'information_schema';
generates the following schema:
type GetTablesRow struct {
Schemaname interface{}
Tablename interface{}
Tableowner interface{}
Tablespace interface{}
Hasindexes pgtype.Bool
Hasrules pgtype.Bool
Hastriggers pgtype.Bool
Rowsecurity pgtype.Bool
}
The type for Schemaname, Tablename, Tableowner
should be string and for Tablespace
a string pointer instead of the interface{}
I believe.
Relevant log output
No response
Database schema
No response
SQL queries
-- name: GetTables :many
SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND
schemaname != 'information_schema';
Configuration
No response
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go