]> granicus.if.org Git - postgresql/commit
Fix psql to not go into infinite recursion when expanding a variable that
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 May 2010 22:19:05 +0000 (22:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 May 2010 22:19:05 +0000 (22:19 +0000)
commit25c139623a3bc1062115bcaa9f2cfbda236faaa4
tree4a286b698b06ef377e01cb38c9f57415a8f36f63
parente761afaba411ea004cf6d00270bf953a80dc699e
Fix psql to not go into infinite recursion when expanding a variable that
refers to itself (directly or indirectly).  Instead, print a message when
recursion is detected, and don't expand the repeated reference.  Per bug
#5448 from Francis Markham.

Back-patch to 8.0.  Although the issue exists in 7.4 as well, it seems
impractical to fix there because of the lack of any state stack that
could be used to track active expansions.
src/bin/psql/psqlscan.l