Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Improve error message for unsupported database types #39

@tunamaguro

Description

@tunamaguro

Problem

When users encounter unsupported PostgreSQL types, the current error message is not very helpful:

error generating code: InvalidRustType(
    "pg_catalog.interval",
)

This error message doesn't provide clear guidance on how to resolve the issue.

Expected Behavior

The error message should:

  1. Clearly explain what the problem is
  2. Provide guidance on how to fix it (using overrides configuration)
  3. Use Display format instead of Debug format for better readability

Example

Instead of the current Debug output, it should show:

Cannot find rust type that matches column type of `pg_catalog.interval`. Add an entry to the 'overrides' section in your sqlc.json configuration.

Impact

This improvement will help users quickly understand and resolve type mapping issues without having to dig through documentation or source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions