Way to get at parsed trigger 'WHEN' clause expression?

Поиск
Список
Период
Сортировка
От James Robinson
Тема Way to get at parsed trigger 'WHEN' clause expression?
Дата
Msg-id 2B58A7BD-8740-4222-BC79-A82E3DCD62E0@socialserve.com
обсуждение исходный текст
Ответы Re: Way to get at parsed trigger 'WHEN' clause expression?  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
Folks,

    I see that psql's \d displays trigger information of a table by making a call to pg_catalog.pg_get_triggerdef(),
whichabstracts away most all need to parse the contents of system catalog pg_trigger. However, we'd like to be able to
getat a human readable representation of just the WHEN clause of the trigger expression. Function pg_get_expr() looked
likely,but fails when fed a pgqual value from pg_trigger ala: 

    ERROR: bogus varno: 2

    I suspect that it is falling over dead trying to parse the representation of NEW and / or OLD. Anything built in,
orshould we just make call to pg_catalog.pg_get_triggerdef() and parse out the WHEN clause text? 

Thanks!
------
James Robinson
Socialserve.com by Emphasys Software





В списке pgsql-general по дате отправления:

Предыдущее
От: Howard News
Дата:
Сообщение: Re: Uninstalled working db by mistake
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Uninstalled working db by mistake