Q:

Converting latlong into PostGIS geometry?

I have this excel spreadsheet with latlong coordinates in it and imported it into Postgis
Problem is that I can't represent it on Geoserver because there is no typical Postgis geometry column
How to create this geometry column using the 2 coordinate fields?

A:

1) Add a new geometry column:
ALTER TABLE mytable ADD COLUMN geom geometry(Point, 4326);

2) Update the new column with the geometry from your long and lat columns:
UPDATE mytable SET geom = ST_SetSRID(ST_MakePoint(long, lat), 4326);

