Skip to content

Support sql.Scanner interface for all Geography types #1765

@kavirajk

Description

@kavirajk

Discussed in #1764

Originally posted by swvooda February 2, 2026
Currently Geography types such as Point, Polygon, Ring, LineString, MultiLineString, MultiPolygon do not support the sql.Scanner interface in their ScanRow implementation.
This creates an inconsistency with other ClickHouse types like UUID, Date, DateTime, etc., which already support sql.Scanner.

When attempting to scan into a custom type that implements sql.Scanner, the driver returns an error:

clickhouse [ScanRow]: (column_name) converting Point to *CustomType is unsupported. 
try using *orb.Point

This forces users to:

  • Scan into concrete orb.* types first (e.g., *orb.Point)
  • Manually convert to their custom types in a second step
  • Maintain buffer/intermediate variables for type conversion

The Solution that would be helpful would be to:
Extend sql.Scanner interface support to all Geography types, similar to how it's already implemented for UUID, Date, and DateTime types (as documented in TYPES.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions