Last active
July 4, 2016 12:02
-
-
Save hvrauhal/91a46bdd7433781286f1f81f4d79b31f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table if exists gist_test; | |
create table gist_test ( | |
bar text, | |
foo text, | |
constraint gist_test_bar_unique unique (bar), | |
constraint gist_test_foo_gist_unique exclude using gist (foo with =) | |
); | |
insert into gist_test (bar, foo) values ('bar', 'foo'); | |
insert into gist_test (bar, foo) values ('baz', 'foo') | |
on conflict on constraint gist_test_bar_unique | |
do nothing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment