Re: BUG #6301: extra space in psql variable expansion - Mailing list pgsql-bugs

From Josh Kupershmidt
Subject Re: BUG #6301: extra space in psql variable expansion
Date
Msg-id CAK3UJRHxCGo1tux3cjWx+tUeZ-Yg9N5Z+qtj+UOQ8tes=8Bp0w@mail.gmail.com
Whole thread Raw
In response to BUG #6301: extra space in psql variable expansion  ("M" <sitrash@email.com>)
List pgsql-bugs
On Fri, Nov 18, 2011 at 4:53 PM, Michael Smolsky <sitrash@email.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

pgsql-bugs by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: BUG #6300: duplicate key value violates unique constraint
Next
From: Tigran Mkrtchyan
Date:
Subject: Re: BUG #6300: duplicate key value violates unique constraint