@echo off
@rem *******************************************************************************************************************
@rem ** Author: Gustavo Moreira
@rem ** 
@rem ** This version is a modification of Robert Lie (Mobilefish.com) version.
@rem **
@rem ** Restores a backup of the semaspv database.
@rem **
@rem ** Software requirement:
@rem ** - Windos XP
@rem ** - PostgreSQL Client
@rem **
@rem ** This script only works on Windows 2000 and XP because 
@rem ** option "usebackq" is only valid for these operating systems.
@rem **
@rem *******************************************************************************************************************

set POSTGRE_USER_ACCOUNT=postgres
set POSTGRE_DIR=C:\PostgreSQL\8.4\bin
set POSTGRE_DATABASE=semaspv

cd %POSTGRE_DIR%
SET PGPASSWORD=postgres
psql -q -f %1 -U %POSTGRE_USER_ACCOUNT% %POSTGRE_DATABASE%

