Je denkt procedureel, terwijl een set-based benadering in de meeste gevallen superieur is in relationele databases. Vind ik leuk:
INSERT INTO table_other (point, polygon, result)
SELECT a.name, b.name, calculate(a.?, b.?) AS result -- undefined what to do
FROM table_point a
JOIN table_polygon b ON ST_Intersects(a.way, b.way)
WHERE a.name = 'Berlin';