Search Postgresql Archives

Re: psql question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steve Crawford <scrawford@xxxxxxxxxxxxxxxxxxxx> writes:
> On 01/30/2013 01:51 PM, Little, Douglas wrote:
>> p1gp1=> \set env dev
>> p1gp1=> \i P1GP1_ETL_STAGE_TBLS_BIO6113_100.:env.sql
>> P1GP1_ETL_STAGE_TBLS_BIO6113_100.:env.sql: No such file or directory
>> 
>> Any thoughts on how I might get this to work?

> Perhaps try concatenating variables then executing the result.

FWIW, Douglas' original coding works for me in 9.2 and HEAD:

regression=# \set env dev
regression=# \i P1GP1_ETL_STAGE_TBLS_BIO6113_100.:env.sql
P1GP1_ETL_STAGE_TBLS_BIO6113_100.dev.sql: No such file or directory

I think we fixed some bugs associated with expansion of variable names
embedded within larger words, but didn't back-patch for fear of breaking
existing apps in a minor release.  Your alternative looks to me like
it's basically dodging those bugs ...

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux