Is it Lon / Lat or Lat / Lon?

In mapping frameworks spatial coordinates are often in order of latitude and longitude. In spatial databases spatial coordinates are in x = longitude, and y = latitude.

If you accidentally loaded data as lat,lon, you can always fix the mistake by using the ST_FlipCoordinates function introduced in PostGIS 2.0.

An example use for geometry:

1ALTER TABLE sometable
2  ALTER COLUMN geom TYPE geometry(LineString,4326)
4    ST_FlipCoordinates(
5        geom)::geometry(LineString,4326);

for geography:

1ALTER TABLE sometable
2  ALTER COLUMN geog TYPE geography(LineString,4326)
3  USING ST_FlipCoordinates(
4    geog::geometry)::geography(LineString,4326);