From 8ae6a08043bee1d2db304c9a7f5e4045b50e873d Mon Sep 17 00:00:00 2001 From: trifonnt Date: Wed, 9 Dec 2009 17:16:00 +0000 Subject: [PATCH] BF[2911533] - Set Postgre DB Search Path https://sourceforge.net/tracker/?func=detail&aid=2911533&group_id=176962&atid=879332 --- utils/postgresql/DBRestore.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/postgresql/DBRestore.sh b/utils/postgresql/DBRestore.sh index 97a43dad7f..5a36689888 100644 --- a/utils/postgresql/DBRestore.sh +++ b/utils/postgresql/DBRestore.sh @@ -1,7 +1,7 @@ #!/bin/sh # $Id: ImportAdempiere.sh,v 1.10 2005/12/20 07:12:17 jjanke Exp $ -echo Adempiere Database Import $Revision: 1.10 $ +echo ADempiere Database Import $Revision: 1.10 $ echo Importing Adempiere DB from $ADEMPIERE_HOME/data/ExpDat.dmp @@ -43,6 +43,8 @@ echo ------------------------------------- echo Import Adempiere_pg.dmp echo ------------------------------------- psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade" +ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, pg_catalog" +psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL" psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $ADEMPIERE_HOME/data/ExpDat.dmp PGPASSWORD=