[postgis-users] Raster import is causing Postgres to close

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Apr 19 08:10:38 PDT 2012

> "When you say " I open the sql file in Postgres ", what do you mean exactly?
> How do you load the file in the db?"
> In the SQL query window for the database, I select File > Open and then
> select the sql file. Normally, once I've done this the code displays in the
> window and I then Execute the query to create the new table.
> "Any error message?"
> Yes, a pop-up that says 'pgAdmin III - PostgreSQL Tools has stopped working.
> A problem
> caused the program to stop working correctly. Windows will close the program
> and notify you if a solution is available.'

First you have to differentiate pgAdmin from PostgreSQL. The problem does not occur in PostgreSQL. It occurs in pgAdmin... Your SQL file is too big to be handled by pgAdmin.

Just go back to your shell where you did raster2pgsql and do (replacing yourpostgresrole and yourDatabase with the correct values)

psql -U yourpostgresrole -f "C:\Users\Data\Thermal.sql" yourDatabase

That's the way to load (or execute) large sql files into PostgreSQL.


More information about the postgis-users mailing list