I don't think you understand how Foreign Key constraints work in PostgreSQL.PostgreSQL will prevent any insert where the value of a column is not within the FK table. So you DO NOT need a check constraint or trigger.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных