pgsql: Fix psql to not go into infinite recursion when expanding a - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix psql to not go into infinite recursion when expanding a
Date
Msg-id 20100505221931.2E8957541D2@cvs.postgresql.org
Whole thread Raw
List 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_0_STABLE

Modified Files:
--------------
    pgsql/src/bin/psql:
        psqlscan.l (r1.9 -> r1.9.4.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/psqlscan.l?r1=1.9&r2=1.9.4.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix psql to not go into infinite recursion when expanding a
Next
From: itagaki@postgresql.org (Takahiro Itagaki)
Date:
Subject: pgsql: Code page for EUC-KR is surely 51949.