Forum OpenACS Q&A: Response to Postgres equivalent of SQL*Loader?

Collapse
Posted by Roberto Mello on
You use psql to bulk upload stuff. It can be either in SQL or COPY statements. For example, to dump and reload a database:

pg_dump mydb > mydb-2000-06-29.dmp (dumps as COPY statements)
pg_dump -d mydb > mydb-sql-2000-06-29.dmp (dumps as SQL statements)

cat mydb-2000-06-29.dmp > psql mydb
For another example, look at the www/install directory of OpenACS (especially the load-geo-tables script). That's how the counties and countries data is loaded.