Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524

PostgreSQLでトリガー、関数を一覧表示

2014/05/07 | PostgreSQL

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524

MySQLみたく「show triggers;」ってしてみたけどダメだった。PostgreSQLではSQLでシステムテーブルを走査するのがお決まりっぽい。

トリガーを一覧表示。

SELECT tgname FROM pg_trigger;

関数一覧を表示(自分の作った関数だけ)。

SELECT TBL_PR.proname FROM pg_proc TBL_PR LEFT JOIN pg_user TBL_US ON TBL_PR.proowner = TBL_US.usesysid WHERE TBL_US.usename = ‘hoge';

2件のコメント


  1. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524
    @daiti0804
    :

    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524

    システムテーブルに直接SQLを発行しなくても、メタコマンド(http://www.postgresql.jp/document/9.3/html/app-psql.html)を使えばよいです。 トリガーなら”¥dft”, 関数なら”¥df” です。


  2. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524
    かおるん
    :

    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524

    ありがとー。
    勉強になりました!。

コメントを残す



Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524
守谷市(まちの情報ポータル) 無料アンケートレンタルjpForm.net

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/usaken/tekmemo.com/public_html/php/wp-content/plugins/ultimate_ga_1.6.0.php on line 524