| От | Tom Lane |
|---|---|
| Тема | Re: How to see a RULE definition? |
| Дата | |
| Msg-id | 11755.979232278@sss.pgh.pa.us обсуждение |
| Ответ на | How to see a RULE definition? (Josh Goodman <jogoodma@lanl.gov>) |
| Ответы |
Re: How to see a RULE definition?
|
| Список | pgsql-general |
Josh Goodman <jogoodma@lanl.gov> writes:
> ... I was able to figure out that all the rules
> for a particular DB are stored in the pg_rewrite table but that seems
> almost unreadable for a human. What I would like is a command that spits
> out the create syntax I used when the rule was first created.
See the (woefully undocumented) pg_get_ruledef() function. pg_dump uses
this.
> On that
> same line of thinking, is there a command to get a list of all rules that
> have been put on a table?
A join of pg_rewrite against pg_class should do it for you ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера