pg_get_triggerdef can't find the trigger using OID. - Mailing list pgsql-general

From AI Rumman
Subject pg_get_triggerdef can't find the trigger using OID.
Date
Msg-id CAGoODpfqHC6txFUWm-A-ztorGGKTGQgD5qf4-y4usUQBGrXjyQ@mail.gmail.com
Whole thread Raw
Responses Re: pg_get_triggerdef can't find the trigger using OID.
List pgsql-general
Why can't pg_get_triggerdef find the trigger using OID.

testdb=# SELECT 
testdb-#   p.oid,
testdb-#   n.nspname as "Schema",
testdb-#   p.proname as "Name",
testdb-#   pg_catalog.pg_get_function_result(p.oid) as "Result data type",
testdb-#   pg_catalog.pg_get_function_arguments(p.oid) as "Argument data types",
testdb-#  CASE
testdb-#   WHEN p.proisagg THEN 'agg'
testdb-#   WHEN p.proiswindow THEN 'window'
testdb-#   WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN 'trigger'
testdb-#   ELSE 'normal'
testdb-# END as "Type"
testdb-# FROM pg_catalog.pg_proc p
testdb-#      LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
testdb-# WHERE pg_catalog.pg_function_is_visible(p.oid)
testdb-#       AND n.nspname <> 'pg_catalog'
testdb-#       AND n.nspname <> 'information_schema'
testdb-# ORDER BY 1, 2, 4;
  oid  | Schema |  Name   | Result data type |                     Argument data types                      |  Type   
-------+--------+---------+------------------+--------------------------------------------------------------+---------
 18249 | public | test_f  | trigger          |                                                              | trigger


testdb=# select pg_get_triggerdef(18249);
ERROR:  could not find tuple for trigger 18249

Thanks.

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: need help
Next
From: "Dennis"
Date:
Subject: Re: Debugging Postgres?