>
>
>
> Hi,
>
> my first question was without answer, I try it again:
>
> IMHO is a problem with the routine pg_get_ruledef(), this routine is used in
> any query in the pg_dump for view dumping. But the pg_get_ruledef() not discern
> contrast between view rules defined as 'select * table' and rules defined as
> 'select * table*' (the query should be run over all classes in the
> inheritance hierarchy).
>
> Is it a bug or a limitation? (The pg_dump is unworkable for a views tables
> runnig over the inheritance hierarchy?)
Surely a bug!
Unfortunately I'm too busy at the moment to tackle it down.
The location where the inheritance is ignored is
src/backend/utils/adt/ruleutils.c
or a similar name - you'll find that file - it's the source
where that damned pg_get_ruledef() is defined. If you can
loacate and fix the problem therein depends on how familiar
you are with interpreting querytrees. At some place the table
name is printed, but I don't know if it is possible to tell
from the data at hand if it is an inheritance. Maybe another
catalog lookup is required there.
Oh man, this little 'piece of magic' (as someone else called
it) was only intended to demonstrate that it is POSSIBLE AT
ALL to translate a querytree back into it's original SQL
statement. Why the hell did I assist in making use of it in
pg_dump?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #