-
Notifications
You must be signed in to change notification settings - Fork 901
Open
Labels
📚 postgresqlbugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Given the following schema:
CREATE TABLE foo (
bar INTEGER NOT NULL
);
It would seem that the correct way to override the type for the bar column would be this:
overrides:
- go_type: "example.com/some.Type"
db_type: "integer"
Due to the SQL parser we use for Postgres, the column type is automatically converted into a canonical format. In this case, it translates integer to pg_catalog.int4. The correct configuration file is this:
overrides:
- go_type: "example.com/some.Type"
db_type: "pg_catalog.int4"
This is very confusing. We should probably attempt to canonicalize the db_type value the same way as the parser.
First reported in #412
alexandear
Metadata
Metadata
Assignees
Labels
📚 postgresqlbugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation