> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>
> Philip Warner <pjw@rhyme.com.au> writes:
> > The only thing that's missing is a 'rulekind' for rules - it
> would be very
> > nice if pg_dump could use a simple method (that didn't involve munging
> > names) to determin is a rule is a 'view rule'.
>
> Oh, I finally see the problem: when you come to dump out the rules, you
> need to avoid dumping the rules that correspond to views because you're
> going to emit the CREATE VIEW commands separately.
>
> You don't really need a rulekind though. If it's an ON SELECT rule for
> a relation that you've determined to be a view, then the rule is a
> view rule. Otherwise, you print the rule.
>
Is it guaranteed that ON SELECT rule is unique per view in the future ?
Regards.
Hiroshi Inoue