Generally not. The second transaction only inserts, therefore, if there is no unique check on the index or other trigger that should occur, data can be inserted unconditionally. In the case of a unique index (including the primary key), it will block if both transactions update rows with the same value, for example:
CREATE TABLE t (x INT PRIMARY KEY);
BEGIN;
INSERT INTO t VALUES (1);
BEGIN;
INSERT INTO t VALUES (1);
COMMIT;
Things are less obvious with updates that may affect insertions by another transaction. I understand that PostgreSQL does not yet support "true" serialization in this case. I do not know how is usually supported by other SQL systems.
See http://www.postgresql.org/docs/current/interactive/mvcc.html
source
share