By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE EXTENSION
CREATE TABLE
COPY 1
ERROR: parse error - invalid geometry HINT: "(-" <-- parse error at position 2 within geometry CONTEXT: COPY my_table, line 1, column geog: "(-122.850334,49.189992)"
COPY 1
ERROR: parse error - invalid geometry HINT: "-122.850334,4" <-- parse error at position 13 within geometry CONTEXT: COPY my_table, line 1, column geog: "-122.850334,49.189992"
COPY 1
ERROR: parse error - invalid geometry HINT: "-122.850334 4" <-- parse error at position 13 within geometry CONTEXT: COPY my_table, line 1, column geog: "-122.850334 49.189992"
COPY 1
ERROR: parse error - invalid geometry HINT: "(-" <-- parse error at position 2 within geometry CONTEXT: COPY my_table, line 1, column geog: "(-122.850334 49.189992)"
COPY 1
COPY 1
| id | description | st_astext |
|---|---|---|
| 1 | abc | POINT(-122.850334 49.189992) |
SELECT 1
TRUNCATE TABLE
COPY 1
ALTER TABLE
COPY 1
| id | description | geog | pg_typeof |
|---|---|---|---|
| 1 | abc | (-122.850334,49.189992) | text |
SELECT 1
| id | description | geog | pg_typeof |
|---|---|---|---|
| 1 | abc | point(-122.850334 49.189992) | text |
UPDATE 1
ALTER TABLE
| id | description | geog | pg_typeof | st_astext |
|---|---|---|---|---|
| 1 | abc | 0101000020E6100000522B4CDF6BB65EC0354069A851984840 | geography | POINT(-122.850334 49.189992) |
SELECT 1
TRUNCATE TABLE
COPY 1
ALTER TABLE
COPY 1
| id | description | geog | pg_typeof |
|---|---|---|---|
| 1 | abc | (-122.850334,49.189992) | point |
SELECT 1
ALTER TABLE
| id | description | geog | pg_typeof | st_astext |
|---|---|---|---|---|
| 1 | abc | 0101000020E6100000522B4CDF6BB65EC0354069A851984840 | geography | POINT(-122.850334 49.189992) |
SELECT 1