Re: how to view original source of rules?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: how to view original source of rules?
Дата
Msg-id 20021126212302.GH5766@dcc.uchile.cl
обсуждение исходный текст
Ответ на how to view original source of rules?  (Ed L. <pggeneral@bluepolka.net>)
Список pgsql-general
On Tue, Nov 26, 2002 at 02:08:52PM -0700, Ed L. wrote:
>
> I know about this query...
>
>   SELECT * FROM pg_rewrite where r.rulename = 'myrule';
>
> ...but the output is none too friendly to look at.
>
> Anyone know how one can see something closer to the original input
> source of a rule via psql?

Did you look at the pg_rules view?  Also look at its definition (\d
pg_rules), it uses a function for converting the parsetree of the rule
into a human readable version, pg_get_ruledef(text).  You can probably
use the same function for your own purposes.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Y dijo Dios: "Que sea Satanás, para que la gente no me culpe de todo a mí."
"Y que hayan abogados, para que la gente no culpe de todo a Satanás"

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

Предыдущее
От: Ed L.
Дата:
Сообщение: how to view original source of rules?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Request from eWeek for 7.3 comments