ALTER TABLE datiordini_c DROP CONSTRAINT enforce_srid_the_geom RESTRICT; UPDATE datiordini_c SET the_geom = ST_SetSRID(the_geom, 4326); ALTER TABLE datiordini_c ADD CONSTRAINT “enforce_srid_the_geom” CHECK (SRID(the_geom)=4326); UPDATE geometry_columns SET SRID=4326 WHERE f_table_name='datiordini_c'; UPDATE datiordini_c SET the_geom = ST_Transform(ST_SetSRID(ST_MakePoint(coordx, coordy),3003),4326)