PostgreSQL: Do not show triggers from other schemas

This commit is contained in:
salacr 2021-02-08 20:43:40 +01:00 committed by Jakub Vrana
parent 51abdcdab9
commit 91da14b15c
2 changed files with 2 additions and 1 deletions

View file

@ -623,7 +623,7 @@ ORDER BY connamespace, conname") as $row) {
function triggers($table) {
$return = array();
foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
foreach (get_rows("SELECT * FROM information_schema.triggers WHERE trigger_schema = current_schema() AND event_object_table = " . q($table)) as $row) {
$return[$row["trigger_name"]] = array($row["action_timing"], $row["event_manipulation"]);
}
return $return;

View file

@ -7,6 +7,7 @@ Support PHP 8 in create table (regression from 4.7.9)
MySQL 8: Fix EXPLAIN in SQL command
PostgreSQL: Create PRIMARY KEY for auto increment columns
PostgreSQL: Avoid exporting empty sequence last value (bug #768)
PostgreSQL: Do not show triggers from other schemas (PR #412)
PostgreSQL: Fix multi-parameter functions in default values (bug #736)
PostgreSQL PDO: Do not select NULL function for false values in edit
SimpleDB, Firebird, ClickHouse: Move to plugin