On Mon, Oct 15, 2018 at 6:43 PM Karsten Hilbert <karsten.hilb...@gmx.net> wrote:
> I would then stick with UniqueViolation. > > Perhaps an attribute > > UniqueViolation.pg_error_name = unique_violation > > so people _can_ know what to grep for ? It makes sense of course. And I was hoping it was available in the diag object [1]. But apparently it's not... So good call: I'll try to add it to the classes. [1] http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.Diagnostics -- Daniele