By far the easiest way is through a foreign data wrapper.  Here are step by
step directions:
https://github.com/pramsey/pgsql-ogr-fdw
I have used this to directly connect to an Excel table, no importing
required.  If you add data to the excel  table and don't change the
structure,  postgresql picks up the changes.
If you need to use gis data, put lat/long data in separate columns.  Then
use a view to create a point from the two columns.
To give you an example, I download earthquake data from the USGS every 5
minutes in CSV format and link to a PostgreSQL database via the above
method.  Queries then compute the distance to selected locations and notify
me if any one of the locations might be effected.  All automatic.
The method above handles every format that ogr can handle.
_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to