Is non-dynamic scalar subquery evaluted for each row?
It is evaluated once.

EXPLAIN ANALYZE will display lines like these:


...
InitPlan 1 (returns $0)
    -&gt;  Index Scan using t2_pkey on t2 (cost=0.29..5.31 rows=1 width=4) (actual time=0.024..0.025 rows=1 loops=1)
          Index Cond: (id = 10)
...



loops=1 tells you the subplan has only been evaluated once. The manual:


  In some query plans, it is possible for a subplan node to be executed
  more than once. For example, the inner index scan will be executed
  once per outer row in the above nested-loop plan. In such cases, the
  loops value reports the total number of executions of the node, [...]


With a correlated subquery like:

SELECT *, (SELECT id FROM t2 WHERE id = t1.parent_id) AS t2_id
FROM   t1;


(or something more useful) you would see loops=n,  where n is the number of rows t1.