Revision 12312
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.sql | ||
---|---|---|
2018 | 2018 |
EXCEPTION |
2019 | 2019 |
WHEN OTHERS THEN |
2020 | 2020 |
errors_ct = errors_ct+1; |
2021 |
PERFORM util.raise_notice(SQLERRM); |
|
2021 |
PERFORM util.raise_error_notice(SQLERRM);
|
|
2022 | 2022 |
END; |
2023 | 2023 |
END LOOP; |
2024 | 2024 |
IF errors_ct > 0 THEN |
2025 |
RAISE internal_error USING MESSAGE = |
|
2026 |
errors_ct||' queries had errors. please see the NOTICEs for details.'; |
|
2025 |
-- can't raise exception because this would roll back the transaction |
|
2026 |
PERFORM util.raise_error_notice(errors_ct |
|
2027 |
||' queries had errors. please see the NOTICEs for details.'); |
|
2027 | 2028 |
END IF; |
2028 | 2029 |
END; |
2029 | 2030 |
$$; |
Also available in: Unified diff
bugfix: schemas/vegbien.sql: remake_diff_tables(): can't raise exception at end if had errors, because this would roll back the transaction. instead use new util.raise_error_notice().