Re: How to see a RULE definition?
От | Jan Wieck |
---|---|
Тема | Re: How to see a RULE definition? |
Дата | |
Msg-id | 200101112017.PAA04975@jupiter.jw.home обсуждение исходный текст |
Ответ на | Re: How to see a RULE definition? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
Tom Lane wrote: > 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. Or just SELECT * FROM pg_rules; > A join of pg_rewrite against pg_class should do it for you ... The above *IS* the join against these two. And there are pg_tables and pg_views as well. Jan :-) -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: