• Tom Lane's avatar
    Prohibit a column from appearing twice in a PRIMARY KEY or UNIQUE · 499c81d3
    Tom Lane authored
    constraint.  This case (a) is useless, (b) violates SQL92, and
    (c) is certain to cause a failure downstream when we try to create
    an index with duplicated column names.  So give an appropriate error
    message instead of letting the index failure occur.  Per report from
    Colin Strickland.  NOTE: currently, CREATE INDEX fooi ON foo(f1,f1)
    still fails with 'cannot insert duplicate key' error.  Should we
    change that too?  What about functional indexes?
    499c81d3
analyze.c 90.2 KB