We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm fiddling around with the project and this behavior seems odd to me, can anyone confirm it is the expected outcome?
CREATE TABLE uk (id integer, s integer, e integer, CONSTRAINT uk_pkey PRIMARY KEY (id, s, e)); SELECT periods.add_period('uk', 'p', 's', 'e'); SELECT periods.add_unique_key('uk', ARRAY['id'], 'p', key_name => 'uk_id_p', unique_constraint => 'uk_pkey'); CREATE TABLE fk (id integer, uk_id integer, s integer, e integer, PRIMARY KEY (id)); SELECT periods.add_period('fk', 'q', 's', 'e'); SELECT periods.add_foreign_key('fk', ARRAY['uk_id'], 'q', 'uk_id_p', key_name => 'fk_uk_id_q'); INSERT INTO uk(id, s, e) VALUES (1, 1, 3) , (1, 3, 5); INSERT INTO fk(uk_id, id, s, e) VALUES (1, 1, 1, 2) , (1, 2, 2, 5); --expected: fail, behavior: deleted delete from uk where (id, s, e) = (1, 1 ,3); --expected: fail, behavior: failed delete from uk where (id, s, e) = (1, 3 ,5); INSERT INTO uk(id, s, e) VALUES (2, 1, 5); INSERT INTO fk(uk_id, id, s, e) VALUES (2, 4, 2, 4); --expected: fail, behavior: updated update uk set e = 3 where (id,s,e) = (2,1,5);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I'm fiddling around with the project and this behavior seems odd to me, can anyone confirm it is the expected outcome?
The text was updated successfully, but these errors were encountered: