0

I am getting the following error when trying to import a raster image to a PostGIS DB using raster2pgsql.

ERROR: current transaction is aborted, commands ignored until end of transaction block

I have tried a number of different solutions without any luck.

OS is Windows 10 PostgreSQL version 12

This is my command

raster2pgsql -s 32735 -I -C -M C:\Users\jaunv\Dropbox\share2server\postgis\2020-09-26-00_00_2020-09-26-23_59_Sentinel-2_L2A_Moisture_index.tiff -F -t 250x250 public.raster | psql -d geofarm -U postgres -p 5432

1 Answers1

0

try to run without -C constraints

and with -e for executing without transaction

Does table public.raster exist and has any data?

also for clean experiment it is better to insert into empty table

https://helpmanual.io/help/raster2pgsql/

Alan Millirud
  • 1,049
  • 7
  • 14
  • Thank you that has solved the problem to a certain extent. But now it seems like there is another issue. After running the command without the C and with the e it seems like the image is processed but at the end gives the following error. DETAIL: Missing left parenthesis. ERROR: function st_convexhull(raster) does not exist LINE 1: CREATE INDEX ON "public"."raster11" USING gist (st_convexhul... HINT: No function matches the given name and argument types. You might need to add explicit type casts. – Jaun van Loggerenberg Apr 28 '21 at 07:21