Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002646Openbravo ERPZ. Otherspublic2008-02-26 06:572008-06-12 09:43
user71 
user71 
normalminoralways
closedfixed 
5
 
2.40alpha-r2 
No
Core
No
0002646: Postgres stored proc translator discards exception err msgs
OS: Linux - Centos 4 (test/prod) & Windows XP (dev)
DB: Postgres 8.1.9 (test/prod) & 8.2.4 (dev)
Release: trunk
Browser: Firefox 2.0.0.6, IE 7

The postgres sql function translator converts plain RAISE; statements to RAISE EXCEPTION '%', '';

This often occurs in the final exception handling clause of functions as a way of passing on an exception raised earlier. When this happens the earlier exception message will be lost, whereas under Oracle a RAISE will preserver the error message.

Fix is to use the SQLERRM variable which holds the current error message.

Also would be nice to put message when raise exception is used to rollback transaction.
No tags attached.
Issue History

Notes
(0006235)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1901891 [^]
(0003226)
user71   
2008-02-27 00:03   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1737231
Originator: YES

File Added: 1901891.patch
(0003227)
marvintm   
2008-03-07 11:36   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1952914
Originator: NO

This has been added to the DBSourceManager trunk. Thanks for your help.
(0003228)
psarobe   
2008-06-05 19:56   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1500703
Originator: NO

Tested doing a random find procedures