code to handle our exceptions from PostgreSQL
code to handle our exceptions from PostgreSQL

As mentioned in the previous commit message and in the NOTE in this
code, the exception handling in PostgreSQL, through psycopg2 to python,
leave some room for improvement. This is our current solution.. someone
should patch postgres and psycopg2 later on..

bbaja42/NIPAP,ettrig/NIPAP,fredsod/NIPAP,garberg/NIPAP,plajjan/NIPAP,SpriteLink/NIPAP,plajjan/NIPAP,fredsod/NIPAP,ettrig/NIPAP,fredsod/NIPAP,plajjan/NIPAP,plajjan/NIPAP,plajjan/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,garberg/NIPAP,SpriteLink/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,SpriteLink/NIPAP,bbaja42/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,plajjan/NIPAP,garberg/NIPAP,garberg/NIPAP,ettrig/NIPAP,garberg/NIPAP,ettrig/NIPAP,garberg/NIPAP,SpriteLink/NIPAP,SoundGoof/NIPAP,bbaja42/NIPAP,SpriteLink/NIPAP,SoundGoof/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,SpriteLink/NIPAP,ettrig/NIPAP,fredsod/NIPAP