Ryan VanderBijl <rvbijl-pgsql(at)vanderbijlfamily(dot)com> writes:
> I've found a way to crash PostgreSQL, using a self-refering view:
This is what comes of saying "oh, adding a REPLACE option to CREATE
is trivial and requires no thought" :-(
While we could check for and disallow direct self-references pretty
easily, I don't think that solves the problem --- one could
still construct infinite recursions involving multiple views.
AFAICS the only real defense is to add a run-time check for recursion
in ApplyRetrieveRule. Annoying; anyone see a better answer?
regards, tom lane