From eb83efa858364f11641edf4032a6dd47bb5cacdc Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 5 Nov 2007 04:14:59 +0000 Subject: [PATCH] set default search path --- utils/postgresql/ImportAdempiere.bat | 4 ++++ utils/postgresql/ImportAdempiere.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/postgresql/ImportAdempiere.bat b/utils/postgresql/ImportAdempiere.bat index f34371c4e4..b731be7dcb 100644 --- a/utils/postgresql/ImportAdempiere.bat +++ b/utils/postgresql/ImportAdempiere.bat @@ -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 diff --git a/utils/postgresql/ImportAdempiere.sh b/utils/postgresql/ImportAdempiere.sh index e37d22f7bb..08df30305b 100644 --- a/utils/postgresql/ImportAdempiere.sh +++ b/utils/postgresql/ImportAdempiere.sh @@ -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