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
#!/usr/bin/env python | |
################################################## | |
# little programming exercise using twisted irc | |
# ibot is a infobot which whole purpose is to | |
# autorespond to a defined set of keywords with | |
# a stored phrase | |
# $Id: bot.py,v 1.4 2003/12/14 13:38:29 pfote Exp $ | |
################################################## |
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
test=# create table j (id1 int, id2 int); | |
CREATE TABLE | |
test=*# create unique index idx_j on j(greatest(id1, id2), least(id1, id2)); | |
CREATE INDEX | |
test=*# insert into j values (1,2); | |
INSERT 0 1 | |
test=*# insert into j values (2,1); | |
ERROR: duplicate key violates unique constraint "idx_j" |
NewerOlder