2

I use raster2pgsql to import raster files into a table with this command line:

C:\Program Files\PostgreSQL\9.3\bin>raster2pgsql -s 4326 -M -F -a c:\temp\mun.tif public.basqui_raster | psql -U postgres -d basqui -h localhost -p 5433

However I would like to add a foreign key constraint to each row during the import. Is it possible to do that when importing raster with raster2pgsql?

What could be the best way to do it?

Edit: I would prefer not use the filename (-F) in a second step to create the foreign key. I would prefer to do it during the import.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.