On Thu, Jun 9, 2016 at 5:01 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:On Thu, Jun 9, 2016 at 4:45 PM, Alex Magnum <magnum11200@gmail.com> wrote:Hi, is there a way to retrieve the comment of rules and triggers. I worked it out on functions, tables, views but am kind of stuck with rules and triggers.https://www.postgresql.org/docs/devel/static/functions-info.htmlTable 9-63. Comment Information Functionsobj_description(object_oid, catalog_name)Catalog Names:pg_triggerpg_rulesThe source catalog for the data is:pg_descriptionI'm suspect of your existing solution given that this is supposed to be a universal interface for comment data...David J.-- To get all rule commentsSELECT DISTINCT r.rulename, c.description FROM pg_rewrite r JOIN pg_description c ON c.objoid = r.oid;-- To get all trigger commentsSELECT DISTINCT t.tgname, c.description FROM pg_trigger t JOIN pg_description c ON c.objoid = t.oid;-- Melvin DavidsonI reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.
On Thu, Jun 9, 2016 at 4:45 PM, Alex Magnum <magnum11200@gmail.com> wrote:Hi, is there a way to retrieve the comment of rules and triggers. I worked it out on functions, tables, views but am kind of stuck with rules and triggers.https://www.postgresql.org/docs/devel/static/functions-info.htmlTable 9-63. Comment Information Functionsobj_description(object_oid, catalog_name)Catalog Names:pg_triggerpg_rulesThe source catalog for the data is:pg_descriptionI'm suspect of your existing solution given that this is supposed to be a universal interface for comment data...David J.
Hi, is there a way to retrieve the comment of rules and triggers. I worked it out on functions, tables, views but am kind of stuck with rules and triggers.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных