Skip to content

pg_catalog.pg_tables uses interface{} rather than string types#2714

@weeco

Description

@weeco

Version

1.21.0

What happened?

This query:

-- name: GetTables :manySELECT*FROMpg_catalog.pg_tablesWHERE schemaname !='pg_catalog'AND schemaname !='information_schema';

generates the following schema:

typeGetTablesRowstruct{Schemanameinterface{} Tablenameinterface{} Tableownerinterface{} Tablespaceinterface{} Hasindexes pgtype.BoolHasrules pgtype.BoolHastriggers pgtype.BoolRowsecurity 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 :manySELECT*FROMpg_catalog.pg_tablesWHERE 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions