I wrote:
> Ryan VanderBijl <rvbijl-pgsql@vanderbijlfamily.com> writes:
>> I've found a way to crash PostgreSQL, using a self-refering view:
> AFAICS the only real defense is to add a run-time check for recursion
> in ApplyRetrieveRule. Annoying; anyone see a better answer?
This turned out to be less painful/expensive than I thought, so there's
now a runtime recursion check in CVS tip:
regression=# SELECT * FROM phy_node_name WHERE node_id = 6;
ERROR: Infinite recursion detected in rules for relation phy_node_name
I don't feel a need to back-patch this into 7.3.*, though; the problem
seems to me to not be worth taking a risk of breaking things.
regards, tom lane