Skip to content

Add support for POSTGIS geometry type  #231

Description

@rupertevill

The following SQL:

CREATE TABLE test_table (
    geometry_column GEOMETRY
);

yields the following error when using 'sqlc generate':

2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry
2020/01/07 11:33:35 unknown Postgres type: geometry

It would be fantastic if geometry could default to simply use the sql.NullString for now.

If it is added, it allows me to reference the geometry type from https://github.com/paulmach/go.geojson as the type override (at the package level). Rather than having to reference each geometry column separately if I want to override the type.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions