CREATE TABLE my_table
(
fk INTEGER,
field_1 INTEGER,
field_2 INTEGER,
field_3 INTEGER
)
VALID:
fk | field_1 | field_2 | field_3
----------+---------------+---------------+---------------
1 | 1 | null | null
1 | null | 1 | null
1 | null | null | 1
It's possible to create check constraint which allows only 1 field of 3 can be not null for 1 fk ?