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

Re: Proposed change for database installation



On 2010-Feb-28 17:12, Chris Travers wrote:
What do folks think?
[...]
However if you set the LSMB_INSTALL_DB environment variable to a true
value, it will leave the db around afterwards.
LSMB_TEST_DB=1 LSMB_NEW_DB=lsmb13 LSMB_INSTALL_DB=1
PG_CONTRIB_DIR=/usr/local/pgsql/share/contrib/ PGUSER=postgres
PGPASSWORD=secret make test
[...]
This would not prevent the make test from being run against a
production db, but use PGDATABASE instead of LSMB_NEW_DB.

Since you asked so nicely :-)

I think you should continue to use the PGDATABASE environment variable throughout, since LSMB_INSTALL_DB already indicates whether or not the database should be, um, "installed". (The only other word I can think of is "provisioned" which is just as bad unless you work for a phone company...)

If you're dealing with more than one database (why?) during 'make install' or whatever it'll be called, then shuffling variables around is sufficiently error-prone that it might be worth using two different variables, but if you're only using one and the only difference between the two code paths is an "if( lsmb_install_db == 1 ) then leave database else delete database" construct, why use two different variables?


--
Thank you,
-Adam Thompson
 <..hidden..>
 (204) 291-7950