I have a Postgres database with PostGIS extension on it. Also, I have a table with column lat with type
(varchar 40). Column values are like this:
52.1432514 52.1431855 52.1431586
I want to convert the whole column to
geometry type. When I do
ALTER TABLE m_copy ALTER COLUMN latitude TYPE geometry USING (latitude::geometry); I see an error:
ERROR: parse error - invalid geometry SQL state: XX000 Hint: "52.1432514" <-- parse error at position 11 within geometry
What am I doing wrong and what is the right query?
P.S Also I have a lon column. Maybe it is better to combine that columns?