1
Ograniczenie unikalności z zakresem dat
Rozważ pricestabelę z tymi kolumnami: id integer primary key product_id integer -- foreign key start_date date not null end_date date not null quantity integer price numeric Chciałbym, aby baza danych egzekwowała zasadę, że produkt może mieć tylko jedną cenę w określonej ilości w zakresie dat (via where <date> BETWEEN start_date …