mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
PostgreSQL: Support UPDATE OF triggers (bug #789) and triggers with more events (OR)
This commit is contained in:
@@ -430,7 +430,7 @@ function drop_create($drop, $create, $drop_created, $test, $drop_test, $location
|
||||
*/
|
||||
function create_trigger($on, $row) {
|
||||
global $jush;
|
||||
$timing_event = " $row[Timing] $row[Event]" . ($row["Event"] == "UPDATE OF" ? " " . idf_escape($row["Of"]) : "");
|
||||
$timing_event = " $row[Timing] $row[Event]" . (preg_match('~ OF~', $row["Event"]) ? " $row[Of]" : ""); // SQL injection
|
||||
return "CREATE TRIGGER "
|
||||
. idf_escape($row["Trigger"])
|
||||
. ($jush == "mssql" ? $on . $timing_event : $timing_event . $on)
|
||||
|
Reference in New Issue
Block a user