Skip to content

Postgis: Support Geometry data type #52

@tordans

Description

@tordans

We are using PostGIS in PostgreSQL to handle geodata.
It looks like the Geometry data type is not supported.
https://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Geometry

["ERROR" - 17:25:00] Error formatting document.
["ERROR" - 17:25:00] Syntax Error: Unexpected "Geometry"
Was expecting to see: "DATE", "DATETIME", "FALSE", "INTERVAL", "JSON", "JSONB", "NULL", "TIME", "TIMESTAMP", "TRUE", "X", "b", number, string, or whitespace
--> /Users/fmc/Development/tilda-geo/processing/topics/parking/punching_areas.sql:42:34
   |
42 | ALTER COLUMN geom TYPE geometry (Geometry, 5243) USING ST_SetSRID (geom, 5243);
   |      

Testcase: https://nene.github.io/prettier-sql-playground/

Input

ALTER TABLE parking_punching_areas
ALTER COLUMN geom TYPE geometry (Geometry, 5243) USING ST_SetSRID (geom, 5243);

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