Hello,
First of all, this english language forum.
For questions in Russian you can use
pgsql-ru-gene...@lists.postgresql.org list or may be postgres.ru site.
As for your question.
/BEGIN; /
/UPDATE website SET hits = hits + 1; /
/DELETE FROM website WHERE hits = 10; /
/COMMIT;/
In this example you forget a main part.
DELETE statement must be run in a second session, after UPDATE in first
session, but before COMMIT.
Look carefully in a documentation:
BEGIN;
UPDATE website SET hits = hits + 1;
-- run from another session: DELETE FROM website WHERE hits = 10;
COMMIT;
So, example is correct.
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company