fix missing when condition
closes #65 Most likely didn't work with postgresql 11 and higher
This commit is contained in:
parent
7e3e9775a4
commit
2faedca137
1 changed files with 3 additions and 1 deletions
|
|
@ -9,7 +9,9 @@ std::string PgTriggerContainer::getLoadQuery() const
|
|||
std::string q =
|
||||
"SELECT oid, tgname, tgrelid, tgfoid, tgtype, tgenabled, tgisinternal, tgconstrrelid, \n"
|
||||
" tgconstrindid, tgconstraint, tgdeferrable, tginitdeferred, tgnargs, tgattr, \n"
|
||||
" tgargs, COALESCE(substring(pg_get_triggerdef(oid), 'WHEN (.*) EXECUTE PROCEDURE'), substring(pg_get_triggerdef(oid), 'WHEN (.*) \\$trigger')) AS whenclause";
|
||||
" tgargs, COALESCE(substring(pg_get_triggerdef(oid), 'WHEN \\(\\((.*)\\)\\) EXECUTE PROCEDURE'), "
|
||||
" substring(pg_get_triggerdef(oid), 'WHEN \\(\\((.*)\\)\\) EXECUTE FUNCTION'),"
|
||||
" substring(pg_get_triggerdef(oid), 'WHEN \\(\\((.*)\\)\\) \\$trigger')) AS whenclause";
|
||||
if (minimumVersion(100000)) {
|
||||
q += ", tgoldtable, tgnewtable";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue