The following bug has been logged online:
Bug reference: 5448
Logged by: Francis
Email address: fmarkham(at)gmail(dot)com
PostgreSQL version: 8.4.3
Operating system: Ubuntu linux 10.04
Description: psql \set does not terminate if variable is referenced
recursively
Details:
psql \set does not terminate if a variable is referenced recursively. For
example, the following will hang the psql client in a nasty way:
db=# \set n 1
db=# \set n (:n + 1)