I have a table in PostGIS 2.3 (PostgreSQL 9.5, and pgadmin III) where I store Multipolygons. I have a csv which is a straight export from another database, including the geometry column in hexewkb format (as I understand). I cannot figure out a way to simply insert this data into the table. Here is an example :
CREATE TABLE tout.battest( id_battest serial NOT NULL, geom geometry(MultiPolygon,2154), CONSTRAINT prk_constraint_battest PRIMARY KEY (id_battest)); INSERT INTO tout.battest(geom) VALUES ('010600000001000000010300000001000000050000007041F528CB332C413B509BE9710A594134371E05CC332C4111F40B87720A594147E56566CD332C4198DF5D7F720A594185EF3C8ACC332C41C03BEDE1710A59417041F528CB332C413B509BE9710A5941');
This insert into raises the error "Geometry SRID (0) does not match column SRID (2154)". So I tried this:
INSERT INTO tout.battest(geom) VALUES (st_setsrid('010600000001000000010300000001000000050000007041F528CB332C413B509BE9710A594134371E05CC332C4111F40B87720A594147E56566CD332C4198DF5D7F720A594185EF3C8ACC332C41C03BEDE1710A59417041F528CB332C413B509BE9710A5941',2154));
Which then raises an error like "the function st_setsrid(unknown, integer) is not unique"
I then tried to call various functions, but without any success, sometime even getting an error "function does not exist" when I actually find it in the function list of my public schema. Any idea on how to do what I want?