From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
Cc: | "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>, "PostgreSQL General (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql question |
Date: | 2013-01-30 23:42:49 |
Message-ID: | 4246.1359589369@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Steve Crawford <scrawford(at)pinpointresearch(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | NickJonas | 2013-01-31 01:42:39 | Re: Windows Phone/Postgresql |
Previous Message | Jeff Janes | 2013-01-30 23:38:26 | Re: naming of wal-archives |