Hi We cannot to raise PostgreSQL exception with setting all possible fields. I propose new function
plpy.ereport(level, [ message [, detail [, hint [, sqlstate, ... ]]]]) The implementation will be based on keyword parameters, so only required parameters should be used. Examples: plpy.ereport(plpy.NOTICE, 'some message', 'some detai') plpy.ereport(plpy.ERROR, 'some message', sqlstate = 'zx243'); Comments, notices, objections? Regards Pavel