Primary key constrain

I have a dimension table, I need a unique constrain on the table's primary key. But I find the constrain seems don't make sense in Vertica. For example, I inserted a primary key(PK00001) into table. and I insert again (PK00001). I supposed it can't be inserted again, but actually it can.

I am wonder if there is a real PK unique constrain at database level for Vertica, or is there any approaches like PK unique constrain at database level. 

Thanks and Best Regards,


  • Hi Martin,

    In vertica, the constraints can be created, but vertica does not check them during the time of data load. So if you are able to load duplicate data in a table with PK or unique key then its a normal thing.

    Constraints are being checked during the time of query execution.
    However you can check the constraints voilations the using ANALYZE_CONSTRAINTS() function.
    Kindly refer to below vertica documentation link


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file