psql question

Поиск
Список
Период
Сортировка
От Little, Douglas
Тема psql question
Дата
Msg-id 8585BA53443004458E0BAA6134C5A7FBB4EB4F08@EGEXCMB01.oww.root.lcl
обсуждение исходный текст
Ответы Re: psql question  (Steve Crawford <scrawford@pinpointresearch.com>)
Список 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.Little@orbitz.com

 cid:image001.jpg@01CABEC8.D4980670  orbitz.com | ebookers.com | hotelclub.com | cheaptickets.com | ratestogo.com | asiahotels.com

 

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: naming of wal-archives
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: psql question