SQL for INSERT:
INSERT INTO geographies (type, name, geometry)
VALUES (
'Location',
'Vintage Heart Coffee',
ST_GeomFromGeoJSON('{"type": "Point", "coordinates": [30.2642, -97.7277]}')
);
-- INSERT 0 1
SQL for SELECT:
SELECT name, ST_AsGeoJSON(geometry) as geo from geographies;
-- name | geo
-- ----------------------+---------------------------------------------------
-- Vintage Heart Coffee | {"type":"Point","coordinates":[30.2642,-97.7277]}
-- (1 row)