Re: A couple of issues with psql variable substitution
От | Tom Lane |
---|---|
Тема | Re: A couple of issues with psql variable substitution |
Дата | |
Msg-id | 28227.1314328428@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: A couple of issues with psql variable substitution (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Thu, Aug 25, 2011 at 5:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> ISTM the general rule ought to be that we attempt to substitute for a >> colon-construct regardless of where it appears within an argument, as >> long as it's not within quotes. > My main thought is that I remember this code being pretty awful - > especially with respect to error handling - when I looked at it. A > lot of dubious behaviors were more or less compelled by the > impossibility of bailing out at an arbitrary point a la ereport(). At > least, barring a drastic refactoring of the code, which might not be a > bad idea either. What I had in mind to do was just to rearrange the flex rules --- the issues that I called out have to do with dubious choices about when to transition between different lexer states. I agree that the error handling isn't terribly friendly in unexpected cases like there not being a connection available to determine the literal-quoting rules, but that's not what I'm on about here. I'm just after consistent variable-expansion behavior in normal operation. regards, tom lane
В списке pgsql-hackers по дате отправления: