PostgreSQL脚本文件未从bat文件执行。
我在PostgreSQL脚本中创建了一个函数,试图在某种情况下调用bat文件,但无法执行。
listView.getChildCount() == yourDataList.size();
:file_exit
echo %CSV_FILE% file
echo file exist !
SET /A COUNT=0
for /f "tokens=*" %%A in ('type %CSV_FILE%') do (
SET /A COUNT+=1
)
set /p PURGE_IMPORT_CSV=Number of records for delete %COUNT% , Are you sure you want to purge related data ? (Y/N):
if %PURGE_IMPORT_CSV%==Y goto purge_import
if %PURGE_IMPORT_CSV%==N goto end_import
goto :done
:purge_import
echo %PASSWORD% file
echo %HOST% file
echo %USERNAME% file
set PGPASSWORD=%PASSWORD%
"C:\Program Files\PostgreSQL\10\bin\psql.exe" -h %HOST% -U %USERNAME% -d %DATABASE% -f config\\postgresql-purge.sql -v csv_file_path=%CSV_FILE%
goto :done
PostgreSQL脚本文件从未在函数purge_import内部调用
//输出
文件存在! 要删除的记录数2,确定要清除相关数据吗? (是/否):是 postgres文件 本地文件 postgres文件
//什么都没发生