#332: SQL for TRIGGER with WHEN clause broken
----------------------+-----------------------------------------------------
Reporter: brsa | Owner: gleu
Type: bug | Status: closed
Priority: minor | Milestone: 1.14
Component: pgadmin | Version: trunk
Resolution: fixed | Keywords: browser trigger
Platform: all |
----------------------+-----------------------------------------------------
Comment(by brsa):
First off, I don't actually understand most of the code, I am only poking
at a spot I found. My "code" is from the top of my head.
My patch apparently fixed the problem but left one set of enclosing
brackets too many.
Your additional patch cuts first and last character from the WHEN-
Expression.
In v1.14 RC1 I still see one set of brackets too many. So, somehow, this
fails to work. Or maybe it does works but still leaves an extra set of
brackets just like pg_get_triggerdef() does. (No idea why.)
In any case, I propose this simpler fix instead:
pgTrigger.cpp, line 393:
- wxT(" substring(pg_get_triggerdef(t.oid), 'WHEN (.*)
EXECUTE PROCEDURE') AS whenclause\n")
+ wxT(" substring(pg_get_triggerdef(t.oid), E'WHEN
\\((.*)\\) EXECUTE PROCEDURE') AS whenclause\n")
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/332#comment:4>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III