サブクエリに基づいてテーブルを更新する方法を尋ねている場合は、隣接するポリゴンのみを検索します(つまり、別のポリゴンに接触します)。
Update gemstat_simple5 gem set spread=1, time=2
FROM (
SELECT (b."GEM_NR")
FROM gemstat_simple5 as a,
gemstat_simple5 as b
WHERE ST_Touches(a.the_geom, b.the_geom)
AND a."GEM_NR" != b."GEM_NR"
AND a.spread = 1
) as subquery
WHERE gem."GEM_NR" = subquery."GEM_NR"
ANDa。"GEM_NR"