Skip to content

Conversation

@edwardwc
Copy link

The geometry() column type accepts config options (type, srid, mode) but getSQLType() was hardcoded to return 'geometry(point)' regardless of config.

Changes:

  • Update PgGeometryBuilder and PgGeometryObjectBuilder to accept and store type and srid config options
  • Update PgGeometry and PgGeometryObject to use config in getSQLType()
  • Update geometry() function to pass config to builders

Now geometry columns correctly generate SQL like:

  • geometry(multipolygon,4326) when both type and srid specified
  • geometry(multipolygon) when only type specified
  • geometry(point) as default

The geometry() column type accepts config options (type, srid, mode) but
getSQLType() was hardcoded to return 'geometry(point)' regardless of config.

Changes:
- Update PgGeometryBuilder and PgGeometryObjectBuilder to accept and store
  type and srid config options
- Update PgGeometry and PgGeometryObject to use config in getSQLType()
- Update geometry() function to pass config to builders

Now geometry columns correctly generate SQL like:
- geometry(multipolygon,4326) when both type and srid specified
- geometry(multipolygon) when only type specified
- geometry(point) as default
@edwardwc edwardwc changed the title Fix geometry column type ignoring config options in SQL generation [Pg] Fix geometry column type ignoring config options in SQL generation Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant