set default search path

This commit is contained in:
Heng Sin Low 2007-11-05 04:14:59 +00:00
parent ed7ac1e533
commit eb83efa858
2 changed files with 5 additions and 1 deletions

View File

@ -27,8 +27,12 @@
@echo -------------------------------------
@echo Import Adempiere_pg.dmp
@echo -------------------------------------
@set ADEMPIERE_ALTER_ROLE_SQL=ALTER ROLE %2 SET search_path TO adempiere, sqlj, pg_catalog
@psql -d %ADEMPIERE_DB_NAME% -U %2 -c "%ADEMPIERE_ALTER_ROLE_SQL%"
@psql -d %ADEMPIERE_DB_NAME% -U %2 -c "drop schema sqlj cascade"
@psql -d %ADEMPIERE_DB_NAME% -U %2 -f %ADEMPIERE_HOME%/data/Adempiere_pg.dmp
@set ADEMPIERE_ALTER_ROLE_SQL=
@set PGPASSWORD=
@goto end

View File

@ -36,7 +36,7 @@ createdb $ADEMPIERE_DB_NAME -E UNICODE -O $2 -U $2
echo -------------------------------------
echo Import Adempiere_pg.dmp
echo -------------------------------------
ADEMPIERE_ALTER_ROLE_SQL = "ALTER ROLE $2 SET search_path TO adempiere, sqjj, pg_catalog"
ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, sqjj, pg_catalog"
psql -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL"
psql -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade"
psql -d $ADEMPIERE_DB_NAME -U $2 -f $ADEMPIERE_HOME/data/Adempiere_pg.dmp