Re: BUG #6301: extra space in psql variable expansion

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Michael Smolsky <sitrash(at)email(dot)com>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6301: extra space in psql variable expansion
Date: 2011-11-18 22:11:37
Message-ID: CAK3UJRHxCGo1tux3cjWx+tUeZ-Yg9N5Z+qtj+UOQ8tes=8Bp0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Nov 18, 2011 at 4:53 PM, Michael Smolsky <sitrash(at)email(dot)com> wrote:
> Could you please also confirm that variable expansion works correctly for
> psql's \i command as well?
>
> Test case (type on psql client prompt):
>
> \set my_dir /some/path/to/sql/script/dir
> \i :my_dir/my-script.sql
>
> I expect the parser to load and execute my-script.sql located within
> /some/path/to/sql/script/dir

Yup, that works on a 9.2dev client:

test=# \set my_dir /tmp/foo/bar/baz
test=# \i :my_dir/test.sql
?column?
----------
1
(1 row)

with test.sql containing the single line "SELECT 1;"

Josh

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Hunsaker 2011-11-18 23:10:11 Re: BUG #6300: duplicate key value violates unique constraint
Previous Message Tigran Mkrtchyan 2011-11-18 21:31:45 Re: BUG #6300: duplicate key value violates unique constraint