Postgresql Unique Constraint Create Table With Matplotlib Histogram