Re: BUG #5448: psql \set does not terminate if variable is referenced recursively
От | Robert Haas |
---|---|
Тема | Re: BUG #5448: psql \set does not terminate if variable is referenced recursively |
Дата | |
Msg-id | AANLkTimGbawPQAGrsVOkCNi2XDM8fsuUm1f8KJy45lnv@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #5448: psql \set does not terminate if variable is referenced recursively (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
On Wed, May 5, 2010 at 1:50 PM, Tom Lane <tgl@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. =A0In particular, > what this problem requires is backing out the stack of flex buffers > representing pending variable expansions. =A0So 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 --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
В списке pgsql-bugs по дате отправления: