Check for interrupts and stack overflow during rule/view dumps.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Apr 2014 17:46:16 +0000 (13:46 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Apr 2014 17:46:16 +0000 (13:46 -0400)
commit0140bee43d55324a066a43bce63fc6ed70c305de
tree30274e831073c9fd7d0fc125d572635037c2228d
parent0652d77fb067137be22dc3e42aa60bffa26726ac
Check for interrupts and stack overflow during rule/view dumps.

Since ruleutils.c recurses, it could be driven to stack overflow by
deeply nested constructs.  Very large queries might also take long
enough to deparse that a check for interrupts seems like a good idea.
Stick appropriate tests into a couple of key places.

Noted by Greg Stark.  Back-patch to all supported branches.
src/backend/utils/adt/ruleutils.c