Thanks a lot for your answer, which solves this case.
I was still a bit surprised as this is linked to transaction management while I have here a single statement until I saw the Compatibility Remark in documentation : Also, PostgreSQL checks non-deferrable uniqueness constraints immediately, not at end of statement as the standard would suggest.
FWIW - PostgreSQL behaves like Oracle in this regard.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.