May 2017
Beginner to intermediate
328 pages
7h 17m
English
For the non-interactive psql data import example we'll do a bit more than in the interactive mode. We'll:
Basically the non-interactive usage of psql means we simply provide it with an SQL to execute. This way we can put together many statements without having to execute them one by one.
Once again we will need the data model prior to loading the data, and then a \COPY command will be used.
If you're still in psql, you can execute a script by simply typing:
\i path\to\the\script.sql
For example:
\i F:/mastering_postgis/chapter02/code/data_import_earthquakes.sql ...
Read now
Unlock full access