I want update table A.localidad, using st_within table B.licalidad
I need make centroid from table a for more precision.
The error, is the subquery return more one row
update test.test set
localidad = (select st_within (st_centroid(a.geom), b.geom) from test.test a, capas_gral.localidades_amba b)
ERROR: una subconsulta utilizada como expresión retornó más de un registro (translation via Google: a subquery used as an expression returned more than one record)
ST_Centroid
can generate points outside the feature, and an inefficiency in that you didn't add ana.geom && b.geom and ...