Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> FWIW, the patch below causes get_viewdef to produce:
> ERROR: pg_get_viewdef: cache lookup of attribute 1 in relation 19136
> failed for rule v_test
> when a table has been deleted.
Not much of a solution --- or do you propose to go through and hack up
every elog in every routine that could potentially be called during
pg_get_ruledef?
The reason that changing pg_dump is a superior solution for this problem
is that there's only one place to change, not umpteen dozen ...
regards, tom lane