| From: | "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com> |
|---|---|
| To: | "PostgreSQL General (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org> |
| Subject: | psql question |
| Date: | 2013-01-30 21:51:33 |
| Message-ID: | 8585BA53443004458E0BAA6134C5A7FBB4EB4F08@EGEXCMB01.oww.root.lcl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I'm looking for a way where I can tailor DDL scripts for deployment with environment variables.
Support I have a requirement to prefix table names with dev_ , fqa_, or prod_
I'd like to have a file for each env with their own unique settings - host, dbname
Dev.sql
\set env dev
Fqa
\set env fqa
prod
\set env prod
and then
my deployment script would have
ddl.sql
\i :env.sql
Create table schema.:env_tablename....
I tried it and didn't work.
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?
Thanks
Doug Little
Sr. Data Warehouse Architect | Business Intelligence Architecture | Orbitz Worldwide
500 W. Madison, Suite 1000 Chicago IL 60661| Office 312.260.2588 | Fax 312.894.5164 | Cell 847-997-5741
Douglas(dot)Little(at)orbitz(dot)com<mailto:Douglas(dot)Little(at)orbitz(dot)com>
[cid:image001(dot)jpg(at)01CDFF01(dot)6452A380] orbitz.com<http://www.orbitz.com/> | ebookers.com<http://www.ebookers.com/> | hotelclub.com<http://www.hotelclub.com/> | cheaptickets.com<http://www.cheaptickets.com/> | ratestogo.com<http://www.ratestogo.com/> | asiahotels.com<http://www.asiahotels.com/>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Carlo Stonebanks | 2013-01-30 22:45:06 | Pg & Tcl - is it dying out? |
| Previous Message | Jeff Janes | 2013-01-30 19:16:09 | Re: naming of wal-archives |