Re: BUG #6301: extra space in psql variable expansion
От | Josh Kupershmidt |
---|---|
Тема | Re: BUG #6301: extra space in psql variable expansion |
Дата | |
Msg-id | CAK3UJRHTU3nsDb66sBf9ZXKr1LGn7ru4RGoaDxE367Mw548W=A@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #6301: extra space in psql variable expansion ("M" <sitrash@email.com>) |
Ответы |
Re: BUG #6301: extra space in psql variable expansion
|
Список | pgsql-bugs |
On Fri, Nov 18, 2011 at 1:12 PM, M <sitrash@email.com> wrote: > > When psql expands a :variable into a string it appends a space to the > expansion string. For example: > > psql (8.4.9) > Type "help" for help. > > testdb=> \set my_home /home/crazy > testdb=> \echo :my_home/my-script.sql > /home/crazy /my-script.sql > > Note the space between /home/crazy and /my-script.sql in the line above, > while there's no space after /home/crazy two lines above where my_home > variable is initialized. It looks like this is a psql bug which has been fixed recently. I see the OP's reported behavior on a 9.1.1 client, but in 9.2dev it works as expected: test=# \set my_home /home/crazy test=# \echo :my_home/my-script.sql /home/crazy/my-script.sql I don't see the exact commit which fixed this, but I do see some fixes to psql's lexer done recently, such as 928311a463d480ca566e2905a369ac6aa0c3e210, so maybe this case got fixed as a nice side-effect. Josh
В списке pgsql-bugs по дате отправления: