Project

General

Profile

« Previous | Next » 

Revision 3468

sql_gen.py: Added plpythonu_error_handler

View differences:

sql_gen.py
503 503

  
504 504
unique_violation_handler = ExcHandler('unique_violation')
505 505

  
506
plpythonu_error_handler = ExcHandler('internal_error', '''\
507
RAISE data_exception USING MESSAGE =
508
    regexp_replace(SQLERRM, E'^PL/Python: \\w+: ', '');
509
''')
510

  
506 511
class RowExcIgnore(Code):
507 512
    def __init__(self, row_type, select_query, with_row, cols=None,
508 513
        exc_handler=unique_violation_handler, row_var='row'):

Also available in: Unified diff