On Wed, May 5, 2010 at 1:50 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> The problem is there's no real support inside psql for "throwing an
> error" --- we have to unwind all the state manually.  In particular,
> what this problem requires is backing out the stack of flex buffers
> representing pending variable expansions.  So I think we need to add
> an explicit recursion test and suppress further expansion of the
> variable when we see it, but there's no very simple way to just abandon
> the current command altogether.

I notIced this when working on Pavel's patch to make :'foo' and :"foo"
do interpolation with literal/identifier quoting, and thought that it
would benefit from some refactoring, but didn't want to bother with it
at the time.  It's seems like kind of a pain for the amount of benefit
we'd likely to get out of it, but I think we'd probably be happier in
the long run.

http://en.wikipedia.org/wiki/Frog_boiling

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to