In PostGIS Geometry is preferred over Geography (round earth model) because the computations are much simpler therefore faster. It also has MANY more available functions but is less accurate over very long distances.
Import your CSV long and lat fields to DECIMAL(10,6)
columns. 6 digits is 10cm precision, should be plenty for most use cases. Then cast your imported data to the correct SRID
The wrong way!
/* try what seems the obvious solution */
DROP TABLE IF EXISTS public.test_geom_bad;
-- Big Ben, London
SELECT ST_SetSRID(ST_MakePoint(-0.116773, 51.510357),4326) AS geom
INTO public.test_geom_bad;
The CORRECT way
/* add the necessary CAST to make it work */
DROP TABLE IF EXISTS public.test_geom_correct;
SELECT ST_SetSRID(ST_MakePoint(-0.116773, 51.510357),4326)::geometry(Geometry, 4326) AS geom
INTO public.test_geom_correct;
Verify SRID is not zero!
/* now observe the incorrect SRID 0 */
SELECT * FROM public.geometry_columns
WHERE f_table_name IN ('test_geom_bad','test_geom_correct');
Validate the order of your long lat parameter using a WKT viewer and
SELECT ST_AsEWKT(geom) FROM public.test_geom_correct
Then index it for best performance
CREATE INDEX idx_target_table_geom_gist
ON target_table USING gist(geom);