pgsql: Fix psql to not go into infinite recursion when expanding a

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix psql to not go into infinite recursion when expanding a
Date: 2010-05-05 22:19:24
Message-ID: 20100505221924.931967541D2@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/bin/psql:
psqlscan.l (r1.15 -> r1.15.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/psqlscan.l?r1=1.15&r2=1.15.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-05-05 22:19:31 pgsql: Fix psql to not go into infinite recursion when expanding a
Previous Message Tom Lane 2010-05-05 22:19:18 pgsql: Fix psql to not go into infinite recursion when expanding a