Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43aa0c9f3c | ||
|
|
fbbf9d1de2 | ||
|
|
6afaa4f400 | ||
|
|
21fd953672 | ||
|
|
ec476d6274 | ||
|
|
ce8fb28b34 | ||
|
|
6ca07528ff | ||
|
|
8136b72364 | ||
|
|
f04b2e33b5 | ||
|
|
08e4cdf2ac | ||
|
|
27bb7ff5db | ||
|
|
5bdd80e3da | ||
|
|
cf29e8df90 | ||
|
|
57c054fb0e | ||
|
|
4a71c6d7af | ||
|
|
1f5ca1b540 | ||
|
|
4ba0e1a6f3 | ||
|
|
560e5f225a | ||
|
|
83f9d8a547 | ||
|
|
480fe6b9fc | ||
|
|
8480c10c74 | ||
|
|
df85392bbf | ||
|
|
155f82676d | ||
|
|
7a06acb678 | ||
|
|
9821e28da5 | ||
|
|
717637c5b9 | ||
|
|
a45c33cf76 | ||
|
|
521985c11a | ||
|
|
f2cef38364 | ||
|
|
5f51c39e6f | ||
|
|
ba8829b64f | ||
|
|
ab54a6d39a | ||
|
|
d1902cd639 | ||
|
|
766b389001 | ||
|
|
b48145f01f | ||
|
|
df7b4d55c6 | ||
|
|
1a6b6f61f7 | ||
|
|
96544424dd | ||
|
|
1d322e2cd9 | ||
|
|
087db8a75e | ||
|
|
88a2309a26 | ||
|
|
d1ecba56b8 | ||
|
|
e5048b4d0b | ||
|
|
e2b0cf6727 | ||
|
|
226c872a84 | ||
|
|
a6ee27cf25 | ||
|
|
419f9069ae | ||
|
|
7dd6372eeb | ||
|
|
920934759f | ||
|
|
20ea8a69f5 | ||
|
|
2860e82c63 | ||
|
|
6719ff141b | ||
|
|
4372dd051e | ||
|
|
98f84e5f34 | ||
|
|
985e089c23 | ||
|
|
eec9714191 | ||
|
|
f877de6a1f | ||
|
|
5f0799714d | ||
|
|
bc63b278be | ||
|
|
55232b0944 | ||
|
|
86712b1bd2 | ||
|
|
38ee39ae7a | ||
|
|
2b4605a9d3 | ||
|
|
b00931407e | ||
|
|
bea176a646 | ||
|
|
6a28b9ff26 | ||
|
|
8bda4e0230 | ||
|
|
189e307671 | ||
|
|
b2d4c6ef9d | ||
|
|
17977d5d0e | ||
|
|
08990cb1de | ||
|
|
9f13865777 | ||
|
|
61d8072a8c | ||
|
|
fa07400fdd | ||
|
|
dab5d94b7c | ||
|
|
2c6938491e | ||
|
|
fa57c02d0e | ||
|
|
83bee60fa4 | ||
|
|
81a5e1ffd3 | ||
|
|
0b5912b09c | ||
|
|
5780719035 | ||
|
|
f0f530e824 | ||
|
|
0bf89f3dc0 | ||
|
|
d5e48ecdc2 | ||
|
|
066a59d89c | ||
|
|
e1a3caa780 | ||
|
|
6492dacbb2 | ||
|
|
a4ed9d6976 | ||
|
|
28126a0a0d | ||
|
|
fb0c322ccf | ||
|
|
719938a14c | ||
|
|
a7ee85619d | ||
|
|
bd356ff9fa | ||
|
|
765e0d03be | ||
|
|
76749efb12 | ||
|
|
9f8f1e8972 | ||
|
|
6d33542b24 | ||
|
|
ae03b7c226 | ||
|
|
246c434b61 | ||
|
|
4496a97a97 | ||
|
|
7a1d9c750a | ||
|
|
ccf58570b1 | ||
|
|
8d9e9eab13 | ||
|
|
fe81ae3285 | ||
|
|
ab27b9d118 | ||
|
|
bc4d16eb83 | ||
|
|
a34b3f27d4 | ||
|
|
252a9b265b | ||
|
|
e17b62c055 | ||
|
|
ccdc1a6c74 | ||
|
|
a02a4eb51a | ||
|
|
b8f49daeb8 | ||
|
|
b8d0db7e7a | ||
|
|
26ae8318f2 | ||
|
|
ba23ba9b8b | ||
|
|
0ffd3d0451 | ||
|
|
a68dac97c4 | ||
|
|
5b86a67a41 | ||
|
|
5960644bae | ||
|
|
39ea7c2916 | ||
|
|
c68848e7f3 | ||
|
|
3ac3e73daf | ||
|
|
567f764234 | ||
|
|
8937375885 | ||
|
|
4f79f00d61 | ||
|
|
554a199fd2 | ||
|
|
b7fb01ab04 | ||
|
|
455c45ea85 | ||
|
|
3ff56b2d49 | ||
|
|
56658a9f8e | ||
|
|
59d8f6fb84 | ||
|
|
f0b6fb0e5d | ||
|
|
732d8d903d | ||
|
|
c2122fbfb9 | ||
|
|
ae1b2149a1 | ||
|
|
c94439bf8e | ||
|
|
31e73f4096 | ||
|
|
92ba055d66 | ||
|
|
201f6d359f | ||
|
|
966279c1b3 | ||
|
|
2ace6a60f3 | ||
|
|
b653b742ed | ||
|
|
eb35629712 | ||
|
|
51cc7c1e33 | ||
|
|
3ecfabfde5 | ||
|
|
71620dc26e | ||
|
|
dea7491df6 | ||
|
|
8f90b801bd | ||
|
|
bb49d69293 | ||
|
|
0493b86d4d | ||
|
|
d5fdd32971 | ||
|
|
c08adb5567 | ||
|
|
79edf40141 | ||
|
|
8232f26882 | ||
|
|
e467ffcfe4 | ||
|
|
163cadc279 | ||
|
|
d0a640442c | ||
|
|
be2ac25fed | ||
|
|
f5e474e4ec | ||
|
|
97cf58fdc8 | ||
|
|
051fd645d7 | ||
|
|
9464e04cf8 | ||
|
|
9b115c5e46 | ||
|
|
78c3db6fc9 | ||
|
|
a97e4c76e4 | ||
|
|
8ec51412c3 | ||
|
|
fa1854bd85 | ||
|
|
659390493d | ||
|
|
05e2e3cb39 | ||
|
|
1617d003cd | ||
|
|
a95775ae49 | ||
|
|
33890da57e | ||
|
|
c0cfc9f29b | ||
|
|
b7c86da586 | ||
|
|
a705fb46a8 | ||
|
|
be055ce57d | ||
|
|
fc886cf8bb | ||
|
|
7805170783 | ||
|
|
94e1e46201 | ||
|
|
61eb94a23c | ||
|
|
1baddd5e9a | ||
|
|
413709fc78 | ||
|
|
1f84285d99 | ||
|
|
d5ebf6777a | ||
|
|
6d7f795260 | ||
|
|
60c44e8f79 | ||
|
|
80b29a85cc | ||
|
|
6668d5eb93 | ||
|
|
637f3b9d1a | ||
|
|
d358369ed5 | ||
|
|
c8b456d464 | ||
|
|
4942c938ac | ||
|
|
3bd9bdad61 | ||
|
|
35b0ab2fe1 | ||
|
|
534f1f35fe | ||
|
|
2abff8f5d4 | ||
|
|
34f1ebc88e | ||
|
|
60893bcdd1 | ||
|
|
c312b03f6f | ||
|
|
9ea118ca57 | ||
|
|
48319d56df | ||
|
|
93d44d5643 | ||
|
|
9c4edb4a28 | ||
|
|
63ba3402e8 | ||
|
|
53ae960aeb | ||
|
|
010ee626bc | ||
|
|
6c59563afa | ||
|
|
1e303dafdd | ||
|
|
faf243db71 | ||
|
|
54b1a79cb6 | ||
|
|
3c4359270e | ||
|
|
3c686d3fbe | ||
|
|
802269910c | ||
|
|
876ce1799a | ||
|
|
6b03cb78af | ||
|
|
156b308fd3 | ||
|
|
9365ab62fe | ||
|
|
695d4e648c | ||
|
|
03b772bf64 | ||
|
|
985a004766 | ||
|
|
83477224cb | ||
|
|
0283f68d7f | ||
|
|
7796a47b12 | ||
|
|
e577859ed2 | ||
|
|
3a6994f719 | ||
|
|
f86c313c18 | ||
|
|
1136e37cf0 | ||
|
|
abf0b1a7ae | ||
|
|
ae5c13188d | ||
|
|
e7316e2181 | ||
|
|
d3c303e455 | ||
|
|
d1ab47c10c | ||
|
|
06ff05762e | ||
|
|
427314cfdf | ||
|
|
92a0bb605d | ||
|
|
efcf87636d | ||
|
|
905cdafe90 | ||
|
|
0c48b79ce7 | ||
|
|
7471dea458 | ||
|
|
4d072ff781 | ||
|
|
da7f088508 | ||
|
|
803eadd5a1 | ||
|
|
31f50634c7 | ||
|
|
8964e511bf | ||
|
|
7cdb489a47 | ||
|
|
78e2ff4f56 | ||
|
|
a4124c2496 | ||
|
|
cca6504d54 | ||
|
|
f5afd5fdb4 | ||
|
|
a9de043fef | ||
|
|
055f7abc9e | ||
|
|
aa1849c13a | ||
|
|
3be22383b8 | ||
|
|
7dbfd23797 | ||
|
|
6753cd7334 | ||
|
|
bcdb8eb275 | ||
|
|
43d3e0ca64 | ||
|
|
51811a451d | ||
|
|
08b3ccc01a | ||
|
|
fa9aebadbd | ||
|
|
5ebd9ee8d3 | ||
|
|
801a2084e9 | ||
|
|
54dd6aae83 | ||
|
|
2332630af8 | ||
|
|
5a49fbd11f | ||
|
|
55875f0cfa | ||
|
|
51cc04b5b0 | ||
|
|
f8771d5585 | ||
|
|
b49d625c2d | ||
|
|
ba70634e5f | ||
|
|
bcb6f37d6f | ||
|
|
05e91044c7 | ||
|
|
c91a597df9 | ||
|
|
9a498c2877 | ||
|
|
3021060a32 | ||
|
|
8148a61279 | ||
|
|
8a56eb9cd0 | ||
|
|
df667bff53 | ||
|
|
c85e14dc25 | ||
|
|
96165044ae | ||
|
|
4dc9fb146a | ||
|
|
7301e30ff3 | ||
|
|
30868614ff | ||
|
|
0677ad254a | ||
|
|
15862e903a | ||
|
|
1a958a3951 | ||
|
|
d5aeb8a691 | ||
|
|
9c382e4d23 | ||
|
|
6f25f4d175 | ||
|
|
942ac733a4 | ||
|
|
258b064963 | ||
|
|
e16a952753 | ||
|
|
e60a84c44f | ||
|
|
db92907fe9 | ||
|
|
2706d9cd8e | ||
|
|
7192a2b675 | ||
|
|
25647c16ba | ||
|
|
4d69764869 | ||
|
|
262d01bf01 | ||
|
|
2042f89ce0 | ||
|
|
6ad44cb51e | ||
|
|
e0da9c5a0c | ||
|
|
c3ddb7df38 | ||
|
|
c6e405ce72 | ||
|
|
d8bd6ea885 | ||
|
|
bc836aa374 | ||
|
|
489349b4e9 | ||
|
|
393ce53d2d | ||
|
|
de1c767e88 | ||
|
|
abcb8c36a3 | ||
|
|
66341e6947 | ||
|
|
7c985695b7 | ||
|
|
97760d65c2 | ||
|
|
5cea5f8485 | ||
|
|
0e41b3364b | ||
|
|
65337daeba | ||
|
|
678699c408 | ||
|
|
8df006343b | ||
|
|
0ec74dfa89 | ||
|
|
2b1c887945 | ||
|
|
51cda98911 | ||
|
|
284adbbb90 | ||
|
|
ca80cfa04a | ||
|
|
0ee9f09bbd | ||
|
|
404f1cc8ef | ||
|
|
4d8b7556f8 | ||
|
|
55c2ab0b24 | ||
|
|
ad46d61bd3 | ||
|
|
03605bf9be | ||
|
|
56e922f5ab | ||
|
|
6f8066d261 | ||
|
|
8520871bc6 | ||
|
|
82aa8035c2 | ||
|
|
852a2fce84 | ||
|
|
601a7b1a5c | ||
|
|
ed3e374df6 | ||
|
|
c32eb6bd37 | ||
|
|
b78b97d89b | ||
|
|
8b3aecd137 |
No files matched your search
@@ -28,7 +28,7 @@ runtime/.qmake.stash
|
||||
runtime/Makefile
|
||||
runtime/Makefile.Debug
|
||||
runtime/Makefile.Release
|
||||
runtime/moc_BrowserWindow.cpp
|
||||
runtime/moc_TrayIcon.cpp
|
||||
runtime/moc_Server.cpp
|
||||
runtime/pgAdmin4.app/
|
||||
runtime/pgAdmin4.pro.user*
|
||||
@@ -36,6 +36,9 @@ runtime/pgAdmin4_resource.rc
|
||||
runtime/release/
|
||||
runtime/ui_BrowserWindow.h
|
||||
web/config_local.py
|
||||
web/geckodriver.log
|
||||
web/regression/test_config.json
|
||||
node_modules/
|
||||
web/pgAdmin/static/js/generated
|
||||
web/pgadmin/static/js/generated
|
||||
web/yarn-error.log
|
||||
@@ -1,497 +0,0 @@
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
REM
|
||||
REM ****************************************************************
|
||||
SET WD=%CD%
|
||||
SET "PGBUILDPATH=%WD%\win-build"
|
||||
SET CMDOPTION=""
|
||||
IF "%1" == "clean" SET CMDOPTION="VALID"
|
||||
IF "%1" == "x86" SET CMDOPTION="VALID"
|
||||
|
||||
IF NOT %CMDOPTION%=="VALID" ( GOTO USAGE )
|
||||
SET ARCHITECTURE=%1
|
||||
|
||||
IF "%ARCHITECTURE%"=="clean" (
|
||||
GOTO CLEAN_RELEASE
|
||||
GOTO EXIT
|
||||
)
|
||||
|
||||
REM Main Functions
|
||||
|
||||
CALL :SET_PGADMIN4_ENVIRONMENT
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :VALIDATE_ENVIRONMENT
|
||||
|
||||
CALL :CLEAN_RELEASE
|
||||
|
||||
CALL :CREATE_VIRTUAL_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :CREATE_RUNTIME_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :CREATE_PYTHON_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :CLEANUP_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :CREATE_INSTALLER
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :SIGN_INSTALLER
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CD %WD%
|
||||
GOTO EXIT
|
||||
REM Main function Ends
|
||||
|
||||
:CLEAN_RELEASE
|
||||
ECHO Calling clean target...
|
||||
IF EXIST "%PGBUILDPATH%" rd "%PGBUILDPATH%" /S /Q
|
||||
|
||||
FOR /R "%WD%" %%f in (*.pyc *.pyo) do DEL /q "%%f" > nul
|
||||
IF EXIST "%WD%\pkg\win32\Output" rd "%WD%\pkg\win32\Output" /S /Q
|
||||
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:SET_PGADMIN4_ENVIRONMENT
|
||||
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27"
|
||||
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\SysWOW64\python27.dll"
|
||||
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.9.1\mingw53_32"
|
||||
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files (x86)\PostgreSQL\9.6"
|
||||
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files (x86)\Inno Setup 5"
|
||||
IF "%YARNDIR%" == "" SET "YARNDIR=C:\Program Files\Yarn"
|
||||
IF "%NODEJSDIR%" == "" SET "NODEJSDIR=C:\Program Files\nodejs"
|
||||
IF "%VCDIR%" == "" SET "VCDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
|
||||
IF "%VCREDIST%" == "" SET "VCREDIST=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\vcredist_x86.exe"
|
||||
IF "%SIGNTOOL%" == "" SET "SIGNTOOL=C:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe"
|
||||
SET "VCREDISTNAME=vcredist_x86.exe"
|
||||
|
||||
GOTO:eof
|
||||
|
||||
:VALIDATE_ENVIRONMENT
|
||||
REM SET the variables IF not availalbe in windows environment
|
||||
SET "QMAKE=%QTDIR%\bin\qmake.exe"
|
||||
SET "VIRTUALENV=venv"
|
||||
SET "TARGETINSTALLER=%WD%\dist"
|
||||
SET "VCREDIST=%VCDIR%\redist\1033\%VCREDISTNAME%"
|
||||
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_RELEASE=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_REVISION_VERSION=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_SUFFIX_VERSION=%%a
|
||||
REM remove single quote from the string
|
||||
SET APP_SUFFIX_VERSION=%APP_SUFFIX_VERSION:'=%
|
||||
SET APP_NAME=""
|
||||
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\config.py') DO SET APP_NAME=%%a
|
||||
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "print('%APP_NAME%'.lower().replace(' ', ''))"') DO SET APP_SHORTNAME=%%G
|
||||
FOR /F "tokens=4,5 delims=. " %%a IN ('%QMAKE% -v ^| findstr /B /C:"Using Qt version "') DO SET QT_VERSION=%%a.%%b
|
||||
|
||||
SET INSTALLERNAME=%APP_SHORTNAME%-%APP_RELEASE%.%APP_REVISION_VERSION%-%APP_SUFFIX_VERSION%-%ARCHITECTURE%.exe
|
||||
IF "%APP_SUFFIX_VERSION%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_RELEASE%.%APP_REVISION_VERSION%-%ARCHITECTURE%.exe
|
||||
|
||||
SET PGADMIN4_VERSION=v%APP_RELEASE%
|
||||
SET PGADMIN4_APP_VERSION=%APP_RELEASE%.%APP_REVISION_VERSION%
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO S U M M A R Y
|
||||
ECHO ****************************************************************
|
||||
ECHO Target mode = x86
|
||||
ECHO INNOTOOL = %INNOTOOL%
|
||||
ECHO VCDIR = %VCDIR%
|
||||
ECHO VCDIST = %VCREDIST%
|
||||
ECHO SIGNTOOL = %SIGNTOOL%
|
||||
ECHO QTDIR = %QTDIR%
|
||||
ECHO QMAKE = %QMAKE%
|
||||
ECHO QT_VERSION = %QT_VERSION%
|
||||
ECHO YARNDIR = %YARNDIR%
|
||||
ECHO NODEJSDIR = %NODEJSDIR%
|
||||
ECHO BROWSER = QtWebKit
|
||||
ECHO PYTHON_HOME = %PYTHON_HOME%
|
||||
ECHO PYTHON_DLL = %PYTHON_DLL%
|
||||
ECHO PGDIR = %PGDIR%
|
||||
ECHO ****************************************************************
|
||||
|
||||
REM Check IF path SET in enviroments really exist or not ?
|
||||
IF NOT EXIST "%INNOTOOL%" GOTO err_handle_inno
|
||||
IF NOT EXIST "%VCDIR%" GOTO err_handle_visualstudio
|
||||
IF NOT EXIST "%VCREDIST%" GOTO err_handle_visualstudio_dist
|
||||
IF NOT EXIST "%QTDIR%" GOTO err_handle_qt
|
||||
IF NOT EXIST "%QMAKE%" GOTO err_handle_qt
|
||||
IF NOT EXIST "%PYTHON_HOME%" GOTO err_handle_python
|
||||
IF NOT EXIST "%PYTHON_DLL%" GOTO err_handle_python
|
||||
IF NOT EXIST "%PGDIR%" GOTO err_handle_pg
|
||||
IF NOT EXIST "%YARNDIR%" GOTO err_handle_yarn
|
||||
IF NOT EXIST "%NODEJSDIR%" GOTO err_handle_nodejs
|
||||
|
||||
REM get Python version ex. 2.7.1 will get as 27
|
||||
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G
|
||||
FOR /f "tokens=2 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G
|
||||
SET "PYTHON_VERSION=%PYTHON_MAJOR%%PYTHON_MINOR%"
|
||||
|
||||
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" GOTO err_handle_pythonvirtualenv
|
||||
|
||||
SET PATH=%PGDIR%;%PGDIR%\bin;%QTDIR%\..\..\Tools\mingw530_32\bin;%NODEJSDIR%;%YARNDIR%\bin;%PATH%;
|
||||
GOTO:eof
|
||||
|
||||
:CREATE_VIRTUAL_ENV
|
||||
ECHO Creating Virtual Enviroment...
|
||||
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
|
||||
|
||||
CD "%PGBUILDPATH%"
|
||||
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Activating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\activate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate"
|
||||
SET PATH=%PGDIR%\bin;%PATH%
|
||||
|
||||
ECHO Installing dependencies...
|
||||
pip install -r "%WD%\requirements.txt"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
pip install sphinx
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Virtual Environment created successfully.
|
||||
|
||||
ECHO Deactivating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\deactivate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\deactivate"
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CREATE_RUNTIME_ENV
|
||||
ECHO Compiling source code...
|
||||
MKDIR "%PGBUILDPATH%\runtime" > nul
|
||||
|
||||
REM --- Processing WEB ---
|
||||
CD "%WD%\web"
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Install Javascript dependencies
|
||||
call yarn install
|
||||
ECHO Bundle all Javascript
|
||||
call yarn run bundle
|
||||
|
||||
XCOPY /S /I /E /H /Y "%WD%\web" "%PGBUILDPATH%\web" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
REM Clean up .pyc, .pyo, pgadmin4.db, config_local.py
|
||||
ECHO Cleaning up unnecessary files...
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (*.pyc *.pyo) do DEL /q "%%f"
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (tests feature_tests __pycache__ node_modules) do RD /Q /S "%%f"
|
||||
RD /Q /S "%PGBUILDPATH%\web\regression"
|
||||
RD /Q /S "%PGBUILDPATH%\web\tools"
|
||||
DEL /q "%PGBUILDPATH%\web\pgadmin4.db"
|
||||
DEL /q "%PGBUILDPATH%\web\config_local.py"
|
||||
|
||||
ECHO Creating config_distro.py
|
||||
ECHO SERVER_MODE = False > "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO HELP_PATH = '../../../docs/en_US/html/' >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO DEFAULT_BINARY_PATHS = { >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO 'pg': '$DIR/../runtime', >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO 'ppas': '' >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO } >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
|
||||
ECHO Activating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\activate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate"
|
||||
|
||||
ECHO Building docs...
|
||||
MKDIR "%PGBUILDPATH%\docs\en_US\html"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CD "%WD%\docs\en_US"
|
||||
"%PGBUILDPATH%\%VIRTUALENV%\Scripts\python.exe" build_code_snippet.py
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
"%PGBUILDPATH%\%VIRTUALENV%\Scripts\sphinx-build.exe" "%WD%\docs\en_US" "%PGBUILDPATH%\docs\en_US\html"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Removing Sphinx
|
||||
pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
|
||||
|
||||
ECHO Fixing backports.csv - adding missing __init__.py
|
||||
type nul >> "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\backports\__init__.py"
|
||||
|
||||
ECHO Assembling runtime environment...
|
||||
CD "%WD%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL "%QMAKE%" "DEFINES+=PGADMIN4_USE_WEBKIT"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL mingw32-make.exe clean
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL mingw32-make.exe
|
||||
IF ERRORLEVEL 1 GOTO ERR_HANDLER
|
||||
|
||||
REM Copy binary to Release Folder
|
||||
copy "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime"
|
||||
IF ERRORLEVEL 1 GOTO ERR_HANDLER
|
||||
|
||||
REM Copy QT dependences
|
||||
copy "%QTDIR%\bin\Qt5Core.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Sql.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Gui.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Qml.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5OpenGL.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Quick.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Sensors.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Widgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Network.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Multimedia.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebChannel.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Positioning.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5PrintSupport.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5MultimediaWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
IF %QT_VERSION% GEQ 5.9 (
|
||||
copy "%QTDIR%\bin\Qt5WebKit.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebKitWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
) ELSE (
|
||||
copy "%QTDIR%\bin\libQt5WebKit.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libQt5WebKitWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
)
|
||||
|
||||
copy "%QTDIR%\bin\icudt57.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\icuin57.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\icuuc57.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libgcc_s_dw2-1.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libstdc++-6.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libwinpthread-1.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libxml2-2.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\libxslt-1.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
MKDIR "%PGBUILDPATH%\runtime\platforms"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\plugins\platforms\qwindows.dll" "%PGBUILDPATH%\runtime\platforms" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO [Paths] > "%PGBUILDPATH%\runtime\qt.conf"
|
||||
ECHO Plugins=plugins >> "%PGBUILDPATH%\runtime\qt.conf"
|
||||
|
||||
copy "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libintl-*.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libiconv-*.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\zlib1.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_dump.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_dumpall.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_restore.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\psql.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
MKDIR "%PGBUILDPATH%\installer"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%VCREDIST%" "%PGBUILDPATH%\installer" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Runtime built successfully.
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CREATE_PYTHON_ENV
|
||||
copy %PYTHON_DLL% "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
REM Copy Python interpretor as it's needed to run background processes
|
||||
copy %PYTHON_HOME%\python.exe "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy %PYTHON_HOME%\pythonw.exe "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\DLLs" "%PGBUILDPATH%\%VIRTUALENV%\DLLs" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\Lib" "%PGBUILDPATH%\%VIRTUALENV%\Lib" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Cleaning up unnecessary files...
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%f in (*.pyc *.pyo) do DEL /q "%%f"
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%\Lib" %%f in (test tests) do RD /Q /S "%%f"
|
||||
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\tcl"
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CREATE_INSTALLER
|
||||
ECHO Preparing for creation of windows installer...
|
||||
IF NOT EXIST "%TARGETINSTALLER%" MKDIR "%TARGETINSTALLER%"
|
||||
|
||||
copy "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CD "%WD%"
|
||||
CD pkg
|
||||
CD win32
|
||||
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_NAME -r """%APP_NAME%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_FULLVERSION -r """%PGADMIN4_APP_VERSION%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss.in_stage3" "-s" MYAPP_VERSION -r """%PGADMIN4_VERSION%"""
|
||||
|
||||
set ARCMODE=
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
set ARCMODE="x64"
|
||||
)
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage3" "-o" "%WD%\pkg\win32\installer.iss.in_stage4" "-s" MYAPP_ARCHITECTURESMODE -r """%ARCMODE%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage4" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%VCREDISTNAME%"""
|
||||
|
||||
|
||||
DEL /s "%WD%\pkg\win32\installer.iss.in_stage*" > nul
|
||||
ECHO Creating windows installer... using INNO tool
|
||||
|
||||
CALL "%INNOTOOL%\ISCC.exe" /q "%WD%\pkg\win32\installer.iss"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO "Location - %TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
ECHO Installer generated successfully.
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:SIGN_INSTALLER
|
||||
ECHO Attempting to sign the installer...
|
||||
"%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO
|
||||
ECHO ************************************************************
|
||||
ECHO * Failed to sign the installer
|
||||
ECHO ************************************************************
|
||||
PAUSE
|
||||
)
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CLEANUP_ENV
|
||||
ECHO Cleaning up private environment...
|
||||
rd "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q
|
||||
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json"
|
||||
|
||||
ECHO Cleaned up private environment successfully.
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:err_handle_inno
|
||||
ECHO %INNOTOOL% does not exist
|
||||
ECHO Please Install Innotool and SET INNOTOOL enviroment Variable.
|
||||
ECHO SET "INNOTOOL=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_visualstudio
|
||||
ECHO %VCDIR% does not exist
|
||||
ECHO Please Install Microsoft Visual studio and SET the VCDIR enviroment Variable.
|
||||
ECHO SET "VCDIR=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_visualstudio_dist
|
||||
ECHO %VCREDIST% does not exist
|
||||
ECHO Please Install Microsoft Visual studio and SET the VCDIST enviroment Variable.
|
||||
ECHO SET "VCDIST=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
|
||||
:err_handle_python
|
||||
ECHO %PYTHON_HOME% does not exist, or
|
||||
ECHO PYTHON_VERSION is not SET, or
|
||||
ECHO %PYTHON_DLL% does not exist.
|
||||
ECHO Please install Python and SET the PYTHON_HOME enviroment Variable.
|
||||
ECHO SET "PYTHON_VERSION=<VERSION NUMBER>"
|
||||
ECHO SET "PYTHON_HOME=<PATH>"
|
||||
ECHO SET "PYTHON_DLL=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_qt
|
||||
ECHO %QTDIR% does not exist.
|
||||
ECHO Please Install QT SDK and SET the QTDIR enviroment variable.
|
||||
ECHO SET "QTDIR=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_yarn
|
||||
ECHO %YARNDIR% does not exist.
|
||||
ECHO Please Install YARN and SET the YARNDIR enviroment variable.
|
||||
ECHO SET "YARNDIR=<YARN PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_nodejs
|
||||
ECHO %NODEJSDIR% does not exist.
|
||||
ECHO Please Install NodeJs and SET the NODEJSDIR enviroment variable.
|
||||
ECHO SET "NODEJSDIR=<NODEJS PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_pg
|
||||
ECHO %PGDIR% does not exist.
|
||||
ECHO Please Install Postgres and SET enviroment Variable
|
||||
ECHO SET "PGDIR=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_pythonvirtualenv
|
||||
ECHO Python virtualenv is missing @ location - %PYTHON_HOME%\Scripts\virtualenv.exe
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:ERR_HANDLER
|
||||
ECHO.
|
||||
ECHO Aborting build!
|
||||
CD %WD%
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:USAGE
|
||||
ECHO Invalid command line options....
|
||||
ECHO Usage: "Make.bat <x86 | clean>"
|
||||
ECHO.
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:EXIT
|
||||
|
||||
@@ -1,260 +1,239 @@
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
REM
|
||||
REM ****************************************************************
|
||||
|
||||
SET WD=%CD%
|
||||
SET "PGBUILDPATH=%WD%\win-build"
|
||||
|
||||
SET CMDOPTION=""
|
||||
IF "%1" == "clean" SET CMDOPTION="VALID"
|
||||
IF "%1" == "x86" SET CMDOPTION="VALID"
|
||||
IF "%1" == "amd64" SET CMDOPTION="VALID"
|
||||
|
||||
IF NOT %CMDOPTION%=="VALID" ( GOTO USAGE )
|
||||
IF NOT %CMDOPTION%=="VALID" (
|
||||
GOTO USAGE
|
||||
)
|
||||
|
||||
SET ARCHITECTURE=%1
|
||||
|
||||
IF "%ARCHITECTURE%"=="clean" (
|
||||
GOTO CLEAN_RELEASE
|
||||
GOTO EXIT
|
||||
CALL :CLEAN
|
||||
EXIT /B %ERRORLEVEL%
|
||||
)
|
||||
|
||||
REM Main Functions
|
||||
|
||||
CALL :SET_PGADMIN4_ENVIRONMENT
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
REM Main build sequence
|
||||
CALL :SET_ENVIRONMENT
|
||||
CALL :VALIDATE_ENVIRONMENT || EXIT /B 1
|
||||
CALL :CLEAN || EXIT /B 1
|
||||
CALL :CREATE_VIRTUAL_ENV || EXIT /B 1
|
||||
CALL :CREATE_RUNTIME_ENV || EXIT /B 1
|
||||
CALL :CREATE_PYTHON_ENV || EXIT /B 1
|
||||
CALL :CLEANUP_ENV || EXIT /B 1
|
||||
CALL :CREATE_INSTALLER || EXIT /B 1
|
||||
CALL :SIGN_INSTALLER || EXIT /B 1
|
||||
|
||||
CALL :VALIDATE_ENVIRONMENT
|
||||
EXIT /B %ERRORLEVEL%
|
||||
REM Main build sequence Ends
|
||||
|
||||
CALL :CLEAN_RELEASE
|
||||
|
||||
CALL :CREATE_VIRTUAL_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
:CLEAN
|
||||
ECHO Removing build directory...
|
||||
IF EXIST "%PGBUILDPATH%" RD "%PGBUILDPATH%" /S /Q > nul || EXIT /B 1
|
||||
|
||||
CALL :CREATE_RUNTIME_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Removing temp build directory...
|
||||
IF EXIST "%WD%\pkg\win32\Output" rd "%WD%\pkg\win32\Output" /S /Q > nul || EXIT /B 1
|
||||
|
||||
CALL :CREATE_PYTHON_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Removing installer configuration script...
|
||||
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul || EXIT /B 1
|
||||
|
||||
CALL :CLEANUP_ENV
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
CALL :CREATE_INSTALLER
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL :SIGN_INSTALLER
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
:SET_ENVIRONMENT
|
||||
ECHO Configuring the environment...
|
||||
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27"
|
||||
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\SysWOW64\python27.dll"
|
||||
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.9.1\mingw53_32"
|
||||
IF "%MAKE%" == "" SET "MAKE=mingw32-make.exe"
|
||||
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files (x86)\PostgreSQL\10"
|
||||
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files (x86)\Inno Setup 5"
|
||||
IF "%VCREDIST%" == "" SET "VCREDIST=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\vcredist_x86.exe"
|
||||
IF "%SIGNTOOL%" == "" SET "SIGNTOOL=C:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe"
|
||||
|
||||
CD %WD%
|
||||
GOTO EXIT
|
||||
REM Main function Ends
|
||||
REM Set VCREDISTNAME (the filename)
|
||||
for /f "delims=" %%i in ("%VCREDIST%") do set "VCREDISTNAME=%%~nxi"
|
||||
|
||||
:CLEAN_RELEASE
|
||||
ECHO Calling clean target...
|
||||
IF EXIST "%PGBUILDPATH%" rd "%PGBUILDPATH%" /S /Q
|
||||
|
||||
FOR /R "%WD%" %%f in (*.pyc *.pyo) do DEL /q "%%f" > nul
|
||||
IF EXIST "%WD%\pkg\win32\Output" rd "%WD%\pkg\win32\Output" /S /Q
|
||||
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:SET_PGADMIN4_ENVIRONMENT
|
||||
REM Check os architecture x86 or amd64
|
||||
SET RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
|
||||
REG.exe Query %RegQry% > checkOS.txt
|
||||
Find /i "x86" < CheckOS.txt > StringCheck.txt
|
||||
SET OSTYPE=""
|
||||
IF %ERRORLEVEL% == 0 (
|
||||
SET OSTYPE=x86
|
||||
) else (
|
||||
SET OSTYPE=amd64
|
||||
)
|
||||
DEL CheckOS.txt StringCheck.txt
|
||||
SET OSVALUE=""
|
||||
IF "%OSTYPE%"=="x86" (
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
ECHO ARCHITECTURE - %ARCHITECTURE% cannot be run on 32 bit machine
|
||||
GOTO EXIT
|
||||
)
|
||||
SET OSVALUE=%OSTYPE%
|
||||
)
|
||||
|
||||
REM Check IF its is windows 32 bit machine and selected architecture is x86
|
||||
IF %OSVALUE%=="x86" (
|
||||
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27"
|
||||
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\System32\python27.dll"
|
||||
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.7\msvc2013"
|
||||
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files\PostgreSQL\9.6"
|
||||
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files\Inno Setup 5"
|
||||
IF "%VCDIR%" == "" SET "VCDIR=C:\Program Files\Microsoft Visual Studio 12.0\VC"
|
||||
SET "VCREDISTNAME=vcredist_x86.exe"
|
||||
)
|
||||
|
||||
REM Check IF its is windows 64 bit machine and selected architecture is x86 or amd64
|
||||
IF "%ARCHITECTURE%"=="x86" (
|
||||
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27"
|
||||
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\SysWOW64\python27.dll"
|
||||
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.7\msvc2013"
|
||||
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files (x86)\PostgreSQL\9.6"
|
||||
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files (x86)\Inno Setup 5"
|
||||
IF "%VCDIR%" == "" SET "VCDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
|
||||
IF "%VCREDIST%" == "" SET "VCREDIST=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\vcredist_x86.exe"
|
||||
SET "VCREDISTNAME=vcredist_x86.exe"
|
||||
)
|
||||
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
IF "%PYTHON_HOME%" == "" SET "PYTHON_HOME=C:\Python27-x64"
|
||||
IF "%PYTHON_DLL%" == "" SET "PYTHON_DLL=C:\Windows\System32\python27.dll"
|
||||
IF "%QTDIR%" == "" SET "QTDIR=C:\Qt\5.7\msvc2013"
|
||||
IF "%PGDIR%" == "" SET "PGDIR=C:\Program Files\PostgreSQL\9.6"
|
||||
IF "%INNOTOOL%" == "" SET "INNOTOOL=C:\Program Files\Inno Setup 5"
|
||||
IF "%VCDIR%" == "" SET "VCDIR=C:\Program Files\Microsoft Visual Studio 12.0\VC"
|
||||
IF "%VCREDIST%" == "" SET "VCREDIST=C:\Program Files\Microsoft Visual Studio 12.0\VC\redist\1033\vcredist_x64.exe"
|
||||
SET "VCREDISTNAME=vcredist_x64.exe"
|
||||
)
|
||||
GOTO:eof
|
||||
|
||||
:VALIDATE_ENVIRONMENT
|
||||
REM SET the variables IF not availalbe in windows environment
|
||||
SET "VCVAR=%VCDIR%\vcvarsall.bat"
|
||||
SET "VCNMAKE=%VCDIR%\bin\nmake.exe"
|
||||
REM Set additional variables we need
|
||||
SET "QMAKE=%QTDIR%\bin\qmake.exe"
|
||||
SET "VIRTUALENV=venv"
|
||||
SET "TARGETINSTALLER=%WD%\dist"
|
||||
SET "VCREDIST=%VCDIR%\redist\1033\%VCREDISTNAME%"
|
||||
FOR /F "tokens=4,5 delims=. " %%a IN ('%QMAKE% -v ^| findstr /B /C:"Using Qt version "') DO SET QT_VERSION=%%a.%%b
|
||||
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_RELEASE=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_REVISION_VERSION=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_SUFFIX_VERSION=%%a
|
||||
SET "VIRTUALENV=venv"
|
||||
SET "TARGET_DIR=%WD%\dist"
|
||||
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_RELEASE =" %WD%\web\config.py') DO SET APP_MAJOR=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_REVISION =" %WD%\web\config.py') DO SET APP_MINOR=%%a
|
||||
FOR /F "tokens=3" %%a IN ('findstr /C:"APP_SUFFIX =" %WD%\web\config.py') DO SET APP_VERSION_SUFFIX=%%a
|
||||
REM remove single quote from the string
|
||||
SET APP_SUFFIX_VERSION=%APP_SUFFIX_VERSION:'=%
|
||||
SET APP_VERSION_SUFFIX=%APP_VERSION_SUFFIX:'=%
|
||||
SET APP_NAME=""
|
||||
FOR /F "tokens=2* DELims='" %%a IN ('findstr /C:"APP_NAME =" web\config.py') DO SET APP_NAME=%%a
|
||||
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "print('%APP_NAME%'.lower().replace(' ', ''))"') DO SET APP_SHORTNAME=%%G
|
||||
FOR /F "tokens=4,5 delims=. " %%a IN ('%QMAKE% -v ^| findstr /B /C:"Using Qt version "') DO SET QT_VERSION=%%a.%%b
|
||||
|
||||
SET INSTALLERNAME=%APP_SHORTNAME%-%APP_RELEASE%.%APP_REVISION_VERSION%-%APP_SUFFIX_VERSION%-%ARCHITECTURE%.exe
|
||||
IF "%APP_SUFFIX_VERSION%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_RELEASE%.%APP_REVISION_VERSION%-%ARCHITECTURE%.exe
|
||||
SET APP_VERSION=%APP_MAJOR%.%APP_MINOR%
|
||||
SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%APP_VERSION_SUFFIX%-%ARCHITECTURE%.exe
|
||||
IF "%APP_VERSION_SUFFIX%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%ARCHITECTURE%.exe
|
||||
|
||||
SET PGADMIN4_VERSION=v%APP_RELEASE%
|
||||
SET PGADMIN4_APP_VERSION=%APP_RELEASE%.%APP_REVISION_VERSION%
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO S U M M A R Y
|
||||
ECHO ****************************************************************
|
||||
ECHO Target mode = %ARCHITECTURE%
|
||||
ECHO INNOTOOL = %INNOTOOL%
|
||||
ECHO VCDIR = %VCDIR%
|
||||
ECHO VCDIST = %VCREDIST%
|
||||
ECHO NMAKE = %VCNMAKE%
|
||||
ECHO QTDIR = %QTDIR%
|
||||
ECHO QMAKE = %QMAKE%
|
||||
ECHO QT_VERSION = %QT_VERSION%
|
||||
IF %QT_VERSION% GEQ 5.5 (
|
||||
ECHO BROWSER = QtWebEngine
|
||||
) ELSE (
|
||||
ECHO BROWSER = QtWebKit
|
||||
)
|
||||
ECHO PYTHON_HOME = %PYTHON_HOME%
|
||||
ECHO PYTHON_DLL = %PYTHON_DLL%
|
||||
ECHO PGDIR = %PGDIR%
|
||||
ECHO ****************************************************************
|
||||
|
||||
REM Check IF path SET in enviroments really exist or not ?
|
||||
IF NOT EXIST "%INNOTOOL%" GOTO err_handle_inno
|
||||
IF NOT EXIST "%VCDIR%" GOTO err_handle_visualstudio
|
||||
IF NOT EXIST "%VCREDIST%" GOTO err_handle_visualstudio_dist
|
||||
IF NOT EXIST "%VCVAR%" GOTO err_handle_visualstudio
|
||||
IF NOT EXIST "%VCNMAKE%" GOTO err_handle_visualstudio
|
||||
IF NOT EXIST "%QTDIR%" GOTO err_handle_qt
|
||||
IF NOT EXIST "%QMAKE%" GOTO err_handle_qt
|
||||
IF NOT EXIST "%PYTHON_HOME%" GOTO err_handle_python
|
||||
IF NOT EXIST "%PYTHON_DLL%" GOTO err_handle_python
|
||||
IF NOT EXIST "%PGDIR%" GOTO err_handle_pg
|
||||
|
||||
REM Check for QT and VC dependences
|
||||
FOR /L %%G IN (15,1,19) DO "%VCDIR%\bin\cl.exe" /? 2>&1 | findstr /C:"Version %%G" > nul && SET MSVC_MAJOR_VERSION=%%G
|
||||
|
||||
IF %MSVC_MAJOR_VERSION%==19 SET QT_MSVC_PATH=msvc2015
|
||||
IF %MSVC_MAJOR_VERSION%==18 SET QT_MSVC_PATH=msvc2013
|
||||
IF %MSVC_MAJOR_VERSION%==17 SET QT_MSVC_PATH=msvc2012
|
||||
IF %MSVC_MAJOR_VERSION%==16 SET QT_MSVC_PATH=msvc2010
|
||||
IF %MSVC_MAJOR_VERSION%==15 SET QT_MSVC_PATH=msvc2008
|
||||
|
||||
REM on 64 bit machine if x86 is selected and QTDIR is set to 64 bit is should not allow
|
||||
IF "%OSTYPE%"=="amd64" (
|
||||
IF "%ARCHITECTURE%"=="x86" (
|
||||
echo "%QTDIR%" | findstr /C:"_64" > nul && ( GOTO err_handle_qt_compactissue )
|
||||
)
|
||||
)
|
||||
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
SET QT_MSVC_PATH=%QT_MSVC_PATH%_64
|
||||
)
|
||||
|
||||
IF NOT EXIST "%QTDIR%\..\%QT_MSVC_PATH%" GOTO err_handle_qt_mismatch
|
||||
|
||||
REM get Python version ex. 2.7.1 will get as 27
|
||||
REM get Python version for the runtime build ex. 2.7.1 will be 27
|
||||
FOR /f "tokens=1 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G
|
||||
FOR /f "tokens=2 DELims=." %%G IN ('%PYTHON_HOME%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G
|
||||
SET "PYTHON_VERSION=%PYTHON_MAJOR%%PYTHON_MINOR%"
|
||||
|
||||
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" GOTO err_handle_pythonvirtualenv
|
||||
EXIT /B 0
|
||||
|
||||
SET PATH=%PGDIR%;%PGDIR%\bin;%PATH%
|
||||
|
||||
GOTO:eof
|
||||
:VALIDATE_ENVIRONMENT
|
||||
ECHO ****************************************************************
|
||||
ECHO S U M M A R Y
|
||||
ECHO ****************************************************************
|
||||
ECHO Build path: %PGBUILDPATH%
|
||||
ECHO Output directory: %TARGET_DIR%
|
||||
ECHO Installer name: %INSTALLERNAME%
|
||||
ECHO.
|
||||
ECHO Python home: %PYTHON_HOME%
|
||||
ECHO Python DLL: %PYTHON_DLL%
|
||||
ECHO Python version: %PYTHON_VERSION%
|
||||
ECHO Python major version: %PYTHON_MAJOR%
|
||||
ECHO Python minor version: %PYTHON_MINOR%
|
||||
ECHO.
|
||||
ECHO Qt home: %QTDIR%
|
||||
ECHO qmake executable: %QMAKE%
|
||||
ECHO Qt version: %QT_VERSION%
|
||||
ECHO.
|
||||
ECHO PostgreSQL home: %PGDIR%
|
||||
ECHO.
|
||||
ECHO VC++ redistributable: %VCREDIST%
|
||||
ECHO VC++ redistributable file: %VCREDISTNAME%
|
||||
ECHO.
|
||||
ECHO innotool executable: %INNOTOOL%
|
||||
ECHO signtool executable: %SIGNTOOL%
|
||||
ECHO.
|
||||
ECHO App major version: %APP_MAJOR%
|
||||
ECHO App minor version: %APP_MINOR%
|
||||
ECHO App version: %APP_VERSION%
|
||||
ECHO App version suffix: %APP_VERSION_SUFFIX%
|
||||
ECHO App short name: %APP_SHORTNAME%
|
||||
ECHO App name: %APP_NAME%
|
||||
ECHO ****************************************************************
|
||||
|
||||
ECHO Checking the environment...
|
||||
IF NOT EXIST "%INNOTOOL%" (
|
||||
ECHO !INNOTOOL! does not exist
|
||||
ECHO Please install Innotool and set the INNOTOOL environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%VCREDIST%" (
|
||||
ECHO !VCREDIST! does not exist
|
||||
ECHO Please install Microsoft Visual studio and set the VCREDIST environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%QTDIR%" (
|
||||
ECHO !QTDIR! does not exist.
|
||||
ECHO Please install Qt and set the QTDIR environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%QMAKE%" (
|
||||
ECHO !QMAKE! does not exist.
|
||||
ECHO Please install Qt and set the QTDIR environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%PYTHON_HOME%" (
|
||||
ECHO !PYTHON_HOME! does not exist.
|
||||
ECHO Please install Python and set the PYTHON_HOME environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%PYTHON_DLL%" (
|
||||
ECHO !PYTHON_DLL! does not exist.
|
||||
ECHO Please install Python and set the PYTHON_DLL environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%PGDIR%" (
|
||||
ECHO !PGDIR! does not exist.
|
||||
ECHO Please install PostgreSQL and set the PGDIR environment variable.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF NOT EXIST "%PYTHON_HOME%\Scripts\virtualenv.exe" (
|
||||
ECHO !PYTHON_HOME!\Scripts\virtualenv.exe does not exist.
|
||||
ECHO Please install the virtualenv package in Python.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
SET "PATH=%PGDIR%\bin;%PATH%"
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_VIRTUAL_ENV
|
||||
ECHO Creating Virtual Enviroment...
|
||||
ECHO Creating virtual environment...
|
||||
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
|
||||
|
||||
REM If we're using VC++, and this is Python 3.6+, we need a hack for PyCrypto
|
||||
IF "%MAKE%" == "nmake" (
|
||||
IF %PYTHON_VERSION% GEQ 36 SET CL=-FI"%VCINSTALLDIR%\INCLUDE\stdint.h"
|
||||
)
|
||||
|
||||
CD "%PGBUILDPATH%"
|
||||
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Activating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\activate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate"
|
||||
SET PATH=%PGDIR%\bin;%PATH%
|
||||
ECHO Activating virtual environment - %PGBUILDPATH%\%VIRTUALENV%...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate" || EXIT /B 1
|
||||
|
||||
ECHO Installing dependencies...
|
||||
pip install -r "%WD%\requirements.txt"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
pip install sphinx
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Virtual Environment created successfully.
|
||||
CALL pip install -r "%WD%\requirements.txt" || EXIT /B 1
|
||||
CALL pip install sphinx || EXIT /B 1
|
||||
|
||||
ECHO Deactivating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\deactivate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\deactivate"
|
||||
REM If we're using VC++, and this is Python 3.6+, we need to remove the hack
|
||||
REM above or it will break qmake. Sigh.
|
||||
IF "%MAKE%" == "nmake" (
|
||||
IF %PYTHON_VERSION% GEQ 36 SET CL=
|
||||
)
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_RUNTIME_ENV
|
||||
ECHO Compiling source code...
|
||||
MKDIR "%PGBUILDPATH%\runtime" > nul
|
||||
MKDIR "%PGBUILDPATH%\runtime"
|
||||
|
||||
REM --- Processing WEB ---
|
||||
CD "%WD%\web"
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Installing javascript dependencies...
|
||||
CALL yarn install || EXIT /B 1
|
||||
|
||||
ECHO Install Javascript dependencies
|
||||
call yarn install
|
||||
ECHO Bundle all Javascript
|
||||
call yarn run bundle
|
||||
ECHO Bundling javascript...
|
||||
CALL yarn run bundle || EXIT /B 1
|
||||
|
||||
XCOPY /S /I /E /H /Y "%WD%\web" "%PGBUILDPATH%\web" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Removing webpack caches...
|
||||
RD /Q /S "%WD%\web\pgadmin\static\js\generated\.cache" 1> nul 2>&1
|
||||
|
||||
REM Clean up .pyc, .pyo, pgadmin4.db, config_local.py
|
||||
ECHO Cleaning up unnecessary files...
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (*.pyc *.pyo) do DEL /q "%%f"
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (tests feature_tests __pycache__ node_modules) do RD /Q /S "%%f"
|
||||
RD /Q /S "%PGBUILDPATH%\web\regression"
|
||||
RD /Q /S "%PGBUILDPATH%\web\tools"
|
||||
DEL /q "%PGBUILDPATH%\web\pgadmin4.db"
|
||||
DEL /q "%PGBUILDPATH%\web\config_local.py"
|
||||
ECHO Copying web directory...
|
||||
XCOPY /S /I /E /H /Y "%WD%\web" "%PGBUILDPATH%\web" > nul || EXIT /B 1
|
||||
|
||||
ECHO Cleaning up unnecessary .pyc and .pyo files...
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
|
||||
ECHO Removing tests, Python caches and node modules...
|
||||
FOR /R "%PGBUILDPATH%\web" %%f in (tests feature_tests __pycache__ node_modules) do RD /Q /S "%%f" 1> nul 2>&1
|
||||
ECHO Removing the test framework...
|
||||
RD /Q /S "%PGBUILDPATH%\web\regression" 1> nul 2>&1
|
||||
ECHO Removing tools...
|
||||
RD /Q /S "%PGBUILDPATH%\web\tools" 1> nul 2>&1
|
||||
ECHO Removing any existing configurations...
|
||||
DEL /q "%PGBUILDPATH%\web\pgadmin4.db" 1> nul 2>&1
|
||||
DEL /q "%PGBUILDPATH%\web\config_local.py" 1> nul 2>&1
|
||||
|
||||
ECHO Creating config_distro.py
|
||||
ECHO SERVER_MODE = False > "%PGBUILDPATH%\web\config_distro.py"
|
||||
@@ -264,341 +243,157 @@ REM Main function Ends
|
||||
ECHO 'ppas': '' >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
ECHO } >> "%PGBUILDPATH%\web\config_distro.py"
|
||||
|
||||
ECHO Activating Virtual Enviroment - %PGBUILDPATH%\%VIRTUALENV%\Scripts\activate...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate"
|
||||
|
||||
ECHO Building docs...
|
||||
MKDIR "%PGBUILDPATH%\docs\en_US\html"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CD "%WD%\docs\en_US"
|
||||
"%PGBUILDPATH%\%VIRTUALENV%\Scripts\python.exe" build_code_snippet.py
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
"%PGBUILDPATH%\%VIRTUALENV%\Scripts\sphinx-build.exe" "%WD%\docs\en_US" "%PGBUILDPATH%\docs\en_US\html"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\python.exe" build_code_snippet.py || EXIT /B 1
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\sphinx-build.exe" "%WD%\docs\en_US" "%PGBUILDPATH%\docs\en_US\html" || EXIT /B 1
|
||||
|
||||
ECHO Removing Sphinx
|
||||
pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
|
||||
CALL pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
|
||||
|
||||
ECHO Fixing backports.csv - adding missing __init__.py
|
||||
type nul >> "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\backports\__init__.py"
|
||||
IF %PYTHON_MAJOR% == 2 (
|
||||
ECHO Fixing backports.csv for Python 2 by adding missing __init__.py
|
||||
type nul >> "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\backports\__init__.py"
|
||||
)
|
||||
|
||||
IF %PYTHON_MAJOR% == 3 (
|
||||
ECHO Fixing PyCrypto module for Python 3...
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py" "-o" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py.new" "-s" "import winrandom" -r "from . import winrandom"
|
||||
MOVE /Y "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py.new" "%PGBUILDPATH%\%VIRTUALENV%\Lib\site-packages\Crypto\Random\OSRNG\nt.py"
|
||||
)
|
||||
|
||||
ECHO Assembling runtime environment...
|
||||
CD "%WD%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL "%VCVAR%" %ARCHITECTURE%
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Running qmake...
|
||||
CALL "%QMAKE%" || EXIT /B 1
|
||||
|
||||
CALL "%QMAKE%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Cleaning the build directory...
|
||||
CALL %MAKE% clean || EXIT /B 1
|
||||
|
||||
CALL "%VCNMAKE%" clean
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Running make...
|
||||
CALL %MAKE% || EXIT /B 1
|
||||
|
||||
CALL "%VCNMAKE%"
|
||||
IF ERRORLEVEL 1 GOTO ERR_HANDLER
|
||||
REM Copy binary to Release Folder
|
||||
copy "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime"
|
||||
IF ERRORLEVEL 1 GOTO ERR_HANDLER
|
||||
ECHO Staging pgAdmin4.exe...
|
||||
COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
|
||||
REM Copy QT dependences
|
||||
copy "%QTDIR%\bin\Qt5Core.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Sql.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Gui.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Qml.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5OpenGL.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Quick.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Sensors.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Widgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Network.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Multimedia.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebChannel.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5Positioning.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5PrintSupport.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5MultimediaWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
REM Install the appropriate browser components. We use QtWebEngine with Qt 5.5+
|
||||
IF %QT_VERSION% GEQ 5.7 (
|
||||
copy "%QTDIR%\bin\Qt5QuickWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
)
|
||||
|
||||
IF %QT_VERSION% GEQ 5.7 (
|
||||
copy "%QTDIR%\resources\icudtl.dat" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\resources\qtwebengine_resources.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\resources\qtwebengine_devtools_resources.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\resources\qtwebengine_resources_100p.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\resources\qtwebengine_resources_200p.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngine.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngineCore.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngineWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\QtWebEngineProcess.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\opengl32sw.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
) ELSE (
|
||||
IF %QT_VERSION% GEQ 5.5 (
|
||||
copy "%QTDIR%\bin\icudt54.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\icuin54.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\icuuc54.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\icudtl.dat" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\qtwebengine_resources.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\qtwebengine_resources_100p.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\qtwebengine_resources_200p.pak" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngine.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngineCore.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebEngineWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\QtWebEngineProcess.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
) ELSE (
|
||||
copy "%QTDIR%\bin\Qt5WebKit.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%QTDIR%\bin\Qt5WebKitWidgets.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
)
|
||||
)
|
||||
|
||||
MKDIR "%PGBUILDPATH%\runtime\platforms"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
copy "%QTDIR%\plugins\platforms\qwindows.dll" "%PGBUILDPATH%\runtime\platforms" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Staging Qt components...
|
||||
COPY "%QTDIR%\bin\Qt5Core.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%QTDIR%\bin\Qt5Gui.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%QTDIR%\bin\Qt5Widgets.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%QTDIR%\bin\Qt5Network.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%QTDIR%\bin\libgcc_s_dw2-1.dll" COPY "%QTDIR%\bin\libgcc_s_dw2-1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%QTDIR%\bin\libstdc++-6.dll" COPY "%QTDIR%\bin\libstdc++-6.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%QTDIR%\bin\libwinpthread-1.dll" COPY "%QTDIR%\bin\libwinpthread-1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
MKDIR "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
|
||||
COPY "%QTDIR%\plugins\platforms\qwindows.dll" "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
|
||||
ECHO [Paths] > "%PGBUILDPATH%\runtime\qt.conf"
|
||||
ECHO Plugins=plugins >> "%PGBUILDPATH%\runtime\qt.conf"
|
||||
|
||||
copy "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libintl-*.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\libiconv-*.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\zlib1.dll" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_dump.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_dumpall.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\pg_restore.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%PGDIR%\bin\psql.exe" "%PGBUILDPATH%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Staging PostgreSQL components...
|
||||
COPY "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\libintl-*.dll" COPY "%PGDIR%\bin\libintl-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\libiconv-*.dll" COPY "%PGDIR%\bin\libiconv-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\zlib.dll" COPY "%PGDIR%\bin\zlib.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\zlib1.dll" COPY "%PGDIR%\bin\zlib1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\pg_dump.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\pg_dumpall.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1L%
|
||||
COPY "%PGDIR%\bin\pg_restore.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\psql.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
|
||||
MKDIR "%PGBUILDPATH%\installer"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy "%VCREDIST%" "%PGBUILDPATH%\installer" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
ECHO Runtime built successfully.
|
||||
ECHO Staging VC++ runtime...
|
||||
MKDIR "%PGBUILDPATH%\installer" || EXIT /B 1
|
||||
COPY "%VCREDIST%" "%PGBUILDPATH%\installer" > nul || EXIT /B 1
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_PYTHON_ENV
|
||||
copy %PYTHON_DLL% "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Staging Python...
|
||||
COPY %PYTHON_DLL% "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY %PYTHON_HOME%\python.exe "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY %PYTHON_HOME%\pythonw.exe "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
|
||||
REM Copy Python interpretor as it's needed to run background processes
|
||||
copy %PYTHON_HOME%\python.exe "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
copy %PYTHON_HOME%\pythonw.exe "%PGBUILDPATH%\runtime" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\DLLs" "%PGBUILDPATH%\%VIRTUALENV%\DLLs" > nul || EXIT /B 1
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\Lib" "%PGBUILDPATH%\%VIRTUALENV%\Lib" > nul || EXIT /B 1
|
||||
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\DLLs" "%PGBUILDPATH%\%VIRTUALENV%\DLLs" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
XCOPY /S /I /E /H /Y "%PYTHON_HOME%\Lib" "%PGBUILDPATH%\%VIRTUALENV%\Lib" > nul
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Cleaning up unnecessary .pyc and .pyo files...
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%f in (*.pyc *.pyo) do DEL /q "%%f" 1> nul 2>&1
|
||||
ECHO Removing tests...
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%\Lib" %%f in (test tests) do RD /Q /S "%%f" 1> nul 2>&1
|
||||
ECHO Removing TCL...
|
||||
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\tcl" 1> nul 2>&1
|
||||
|
||||
ECHO Cleaning up unnecessary files...
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%" %%f in (*.pyc *.pyo) do DEL /q "%%f"
|
||||
FOR /R "%PGBUILDPATH%\%VIRTUALENV%\Lib" %%f in (test tests) do RD /Q /S "%%f"
|
||||
RD /Q /S "%PGBUILDPATH%\%VIRTUALENV%\tcl"
|
||||
EXIT /B 0
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CREATE_INSTALLER
|
||||
ECHO Preparing for creation of windows installer...
|
||||
IF NOT EXIST "%TARGETINSTALLER%" MKDIR "%TARGETINSTALLER%"
|
||||
IF NOT EXIST "%TARGET_DIR%" MKDIR "%TARGET_DIR%"
|
||||
|
||||
copy "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Copying icon file...
|
||||
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%" > nul || EXIT /B 1
|
||||
|
||||
CD "%WD%"
|
||||
CD pkg
|
||||
CD win32
|
||||
CD "%WD%\pkg\win32"
|
||||
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_NAME -r """%APP_NAME%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_FULLVERSION -r """%PGADMIN4_APP_VERSION%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss.in_stage3" "-s" MYAPP_VERSION -r """%PGADMIN4_VERSION%"""
|
||||
ECHO Processing installer configuration script...
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in" "-o" "%WD%\pkg\win32\installer.iss.in_stage1" "-s" MYAPP_NAME -r """%APP_NAME%"""
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage1" "-o" "%WD%\pkg\win32\installer.iss.in_stage2" "-s" MYAPP_FULLVERSION -r """%APP_VERSION%"""
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage2" "-o" "%WD%\pkg\win32\installer.iss.in_stage3" "-s" MYAPP_VERSION -r """v%APP_MAJOR%"""
|
||||
|
||||
set ARCMODE=
|
||||
SET ARCMODE=
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
set ARCMODE="x64"
|
||||
)
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage3" "-o" "%WD%\pkg\win32\installer.iss.in_stage4" "-s" MYAPP_ARCHITECTURESMODE -r """%ARCMODE%"""
|
||||
"%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage4" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%VCREDISTNAME%"""
|
||||
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage3" "-o" "%WD%\pkg\win32\installer.iss.in_stage4" "-s" MYAPP_ARCHITECTURESMODE -r """%ARCMODE%"""
|
||||
CALL "%PYTHON_HOME%\python" "%WD%\pkg\win32\replace.py" "-i" "%WD%\pkg\win32\installer.iss.in_stage4" "-o" "%WD%\pkg\win32\installer.iss" "-s" MYAPP_VCDIST -r """%VCREDISTNAME%"""
|
||||
|
||||
ECHO Cleaning up...
|
||||
DEL /s "%WD%\pkg\win32\installer.iss.in_stage*" > nul
|
||||
ECHO Creating windows installer... using INNO tool
|
||||
|
||||
CALL "%INNOTOOL%\ISCC.exe" /q "%WD%\pkg\win32\installer.iss"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Creating windows installer using INNO tool...
|
||||
CALL "%INNOTOOL%\ISCC.exe" /q "%WD%\pkg\win32\installer.iss" || EXIT /B 1
|
||||
|
||||
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO Renaming installer...
|
||||
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGET_DIR%\%INSTALLERNAME%" > nul || EXIT /B 1
|
||||
|
||||
ECHO "Location - %TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
ECHO Location - %TARGET_DIR%\%INSTALLERNAME%
|
||||
ECHO Installer generated successfully.
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:SIGN_INSTALLER
|
||||
ECHO Attempting to sign the installer...
|
||||
signtool sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGETINSTALLER%\%INSTALLERNAME%"
|
||||
CALL "%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGET_DIR%\%INSTALLERNAME%"
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO
|
||||
ECHO.
|
||||
ECHO ************************************************************
|
||||
ECHO * Failed to sign the installer
|
||||
ECHO ************************************************************
|
||||
SLEEP 5
|
||||
PAUSE
|
||||
)
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CLEANUP_ENV
|
||||
ECHO Cleaning up private environment...
|
||||
rd "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q
|
||||
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json"
|
||||
ECHO Cleaning the build environment...
|
||||
RD "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q 1> nul 2>&1
|
||||
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json" 1> nul 2>&1
|
||||
|
||||
ECHO Cleaned up private environment successfully.
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
EXIT /B 0
|
||||
|
||||
:err_handle_inno
|
||||
ECHO %INNOTOOL% does not exist
|
||||
ECHO Please Install Innotool and SET INNOTOOL enviroment Variable.
|
||||
ECHO SET "INNOTOOL=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_visualstudio
|
||||
ECHO %VCDIR% does not exist, or
|
||||
ECHO %VCVAR% does not exist, or
|
||||
ECHO %VCNMAKE% does not exist.
|
||||
ECHO Please Install Microsoft Visual studio and SET the VCDIR enviroment Variable.
|
||||
ECHO SET "VCDIR%=<PATH>"
|
||||
ECHO SET "VCVAR%=<PATH>"
|
||||
ECHO SET "VCNMAKE%=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_visualstudio_dist
|
||||
ECHO %VCREDIST% does not exist
|
||||
ECHO Please Install Microsoft Visual studio and SET the VCDIST enviroment Variable.
|
||||
ECHO SET "VCDIST%=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
|
||||
:err_handle_python
|
||||
ECHO %PYTHON_HOME% does not exist, or
|
||||
ECHO PYTHON_VERSION is not SET, or
|
||||
ECHO %PYTHON_DLL% does not exist.
|
||||
ECHO Please install Python and SET the PYTHON_HOME enviroment Variable.
|
||||
ECHO SET "PYTHON_VERSION=<VERSION NUMBER>"
|
||||
ECHO SET "PYTHON_HOME=<PATH>"
|
||||
ECHO SET "PYTHON_DLL=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_qt
|
||||
ECHO %QTDIR% does not exist.
|
||||
ECHO Please Install QT SDK and SET the QTDIR enviroment variable.
|
||||
ECHO SET "QTDIR=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_qt_mismatch
|
||||
ECHO %QTDIR%\..\%QT_MSVC_PATH%" does not match with your current Visual Studio, version %QT_MSVC_PATH%
|
||||
ECHO Your current QT installation willraise a linking error with an MSVC version mismatch.
|
||||
ECHO Please use a valid QT installation with a folder %QT_MSVC_PATH%. You can use the Qt Maintenance
|
||||
ECHO Tool to add or remove compiler kits.
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_qt_compactissue
|
||||
ECHO %QTDIR%" does support the current architecture selected %ARCHITECTURE%
|
||||
ECHO Please use a valid QT installation with a folder %QT_MSVC_PATH%. You can use the Qt Maintenance
|
||||
ECHO Tool to add or remove compiler kits.
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_pg
|
||||
ECHO %PGDIR% does not exist.
|
||||
ECHO Please Install Postgres and SET enviroment Variable
|
||||
ECHO SET "PGDIR=<PATH>"
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:err_handle_pythonvirtualenv
|
||||
ECHO Python virtualenv is missing @ location - %PYTHON_HOME%\Scripts\virtualenv.exe
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:ERR_HANDLER
|
||||
ECHO.
|
||||
ECHO Aborting build!
|
||||
CD %WD%
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:USAGE
|
||||
ECHO Invalid command line options....
|
||||
ECHO Usage: "Make.bat <x86 | amd64 | clean>"
|
||||
ECHO Invalid command line options.
|
||||
ECHO Usage: "Make.bat <x86 | clean>"
|
||||
ECHO.
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:EXIT
|
||||
EXIT /B 1
|
||||
|
||||
@@ -14,14 +14,11 @@ SHELL = /bin/sh
|
||||
#########################################################################
|
||||
|
||||
# Include only platform-independent builds in all
|
||||
all: docs pip src
|
||||
all: docs pip src runtime
|
||||
|
||||
appbundle: docs
|
||||
./pkg/mac/build.sh
|
||||
|
||||
appbundle-webkit: docs
|
||||
PGADMIN4_USE_WEBKIT=1 ./pkg/mac/build.sh
|
||||
|
||||
install-node:
|
||||
cd web && yarn install
|
||||
|
||||
@@ -35,7 +32,10 @@ linter:
|
||||
cd web && yarn run linter
|
||||
|
||||
check: install-node bundle linter
|
||||
cd web && yarn run karma start -- --single-run && python regression/runtests.py
|
||||
cd web && pycodestyle --config=.pycodestyle . && yarn run karma start --single-run && python regression/runtests.py
|
||||
|
||||
check-pep8:
|
||||
cd web && pycodestyle --config=.pycodestyle .
|
||||
|
||||
check-python:
|
||||
cd web && python regression/runtests.py --exclude feature_tests
|
||||
@@ -44,10 +44,23 @@ check-feature: install-node bundle
|
||||
cd web && python regression/runtests.py --pkg feature_tests
|
||||
|
||||
check-js: install-node linter
|
||||
cd web && yarn run karma start -- --single-run
|
||||
cd web && yarn run karma start --single-run
|
||||
|
||||
runtime-debug:
|
||||
cd runtime && qmake CONFIG+=debug && make
|
||||
|
||||
runtime:
|
||||
cd runtime && qmake CONFIG+=release && make
|
||||
|
||||
# Include all clean sub-targets in clean
|
||||
clean: clean-appbundle clean-docker clean-dist clean-docs clean-pip clean-src
|
||||
clean: clean-appbundle clean-docker clean-dist clean-docs clean-node clean-pip clean-src clean-runtime
|
||||
rm -rf web/pgadmin/static/js/generated/*
|
||||
rm -rf web/pgadmin/static/js/generated/.cache
|
||||
rm -rf web/pgadmin/static/css/generated/*
|
||||
rm -rf web/pgadmin/static/css/generated/.cache
|
||||
|
||||
clean-runtime:
|
||||
cd runtime && make clean
|
||||
|
||||
clean-appbundle:
|
||||
rm -rf mac-build/
|
||||
@@ -61,6 +74,9 @@ clean-dist:
|
||||
clean-docs:
|
||||
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx clean
|
||||
|
||||
clean-node:
|
||||
rm -rf web/node-modules/
|
||||
|
||||
clean-pip:
|
||||
rm -rf pip-build/
|
||||
|
||||
|
||||
@@ -18,18 +18,16 @@ utilised.
|
||||
Although developed using web technologies, pgAdmin 4 can be deployed either on
|
||||
a web server using a browser, or standalone on a workstation. The runtime/
|
||||
subdirectory contains a QT based runtime application intended to allow this -
|
||||
it is essentially a browser and Python interpreter in one package which is
|
||||
capable of hosting the Python application and presenting it to the user as a
|
||||
desktop application.
|
||||
it is essentially a Python application server that runs in the system tray
|
||||
and allows the user to connect to the application using their web browser.
|
||||
|
||||
Building the Runtime
|
||||
--------------------
|
||||
|
||||
To build the runtime, the following packages must be installed:
|
||||
|
||||
- QT 4.6 or above, up to 5.5 (older versions may work, but haven't been tested,
|
||||
newer versions are not yet supported as Qt Webkit has been deprecated).
|
||||
- Python 2.6, 2.7 or 3.3+
|
||||
- QT 4.6 or above
|
||||
- Python 2.6, 2.7 or 3.3+ (2.7 only on Windows)
|
||||
|
||||
Assuming both qmake and python-config are in the path:
|
||||
|
||||
@@ -82,6 +80,7 @@ Create a migration file with the following command:
|
||||
|
||||
This will create a file in: $PGADMIN4_SRC/web/migrations/versions/ .
|
||||
Add any changes to the 'upgrade' function.
|
||||
Increment the SCHEMA_VERSION in $PGADMIN4_SRC/web/pgadmin/model/__init__.py file.
|
||||
|
||||
There is no need to increment the SETTINGS_SCHEMA_VERSION.
|
||||
|
||||
@@ -210,7 +209,7 @@ installed. Then, you can run the following commands on a *nix system to
|
||||
download the required packages and build the bundle:
|
||||
|
||||
(pgadmin4) $ cd $PGADMIN4_SRC
|
||||
(pgadmin4) $ make node-install
|
||||
(pgadmin4) $ make install-node
|
||||
(pgadmin4) $ make bundle
|
||||
|
||||
On Windows systems (where "make" is not available, the following commands
|
||||
@@ -230,8 +229,8 @@ a number of known locations for the pgAdmin4.py file needed to run pgAdmin
|
||||
an alternate path if needed.
|
||||
|
||||
If either a working environment or pgAdmin4.py cannot be found at startup, the
|
||||
runtime will prompt for the locations. Alternatively, you can use Alt+Shift+P
|
||||
to open the path configuration dialogue.
|
||||
runtime will prompt for the locations. Alternatively, you can click the try
|
||||
icon and select the Configuration option to open the configuration dialogue.
|
||||
|
||||
On a Linux/Mac system, the Python Path will typically consist of a single path
|
||||
to the virtual environment's site-packages directory, e.g.
|
||||
@@ -308,11 +307,11 @@ Qt 5.5.1, Python 2.7 and Visual Studio 2013. The examples below are for a
|
||||
similar 32 bit system:
|
||||
|
||||
INNOTOOL=C:\Program Files\Inno Setup 5
|
||||
PGDIR=C:\Program Files\PostgreSQL\9.6
|
||||
PGDIR=C:\Program Files\PostgreSQL\10
|
||||
PYTHON_DLL=C:\Windows\System32\Python27.dll
|
||||
PYTHON_HOME=C:\Python27
|
||||
PYTHON_VERSION=27
|
||||
QTDIR=C:\Qt\5.5\msvc2013
|
||||
QTDIR=C:\Qt\5.9\msvc2013
|
||||
VCDIR=C:\Program Files\Microsoft Visual Studio 12.0\VC
|
||||
|
||||
To build the installer:
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
echo "EXECUTING: Build docs"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE
|
||||
cd ${WORKSPACE}
|
||||
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate
|
||||
|
||||
SPHINX_VER=""
|
||||
if [ "$PYTHON_VERSION" = "2.6" -o "$PYTHON_VERSION" = "3.3" ]; then
|
||||
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
|
||||
SPHINX_VER="==1.4.9"
|
||||
fi
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install Sphinx$SPHINX_VER || { echo 'ERROR: Failed to install Sphinx to build the docs.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the docs.' ; exit 1; }
|
||||
|
||||
make docs || { echo 'ERROR: Failed to build the documentation.' ; exit 1; }
|
||||
@@ -3,15 +3,15 @@
|
||||
echo "EXECUTING: Build PIP wheel"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE
|
||||
cd ${WORKSPACE}
|
||||
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate
|
||||
|
||||
SPHINX_VER=""
|
||||
if [ "$PYTHON_VERSION" = "2.6" -o "$PYTHON_VERSION" = "3.3" ]; then
|
||||
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
|
||||
SPHINX_VER="==1.4.9"
|
||||
fi
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install Sphinx$SPHINX_VER || { echo 'ERROR: Failed to install Sphinx to build the PIP wheel.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the PIP wheel.' ; exit 1; }
|
||||
|
||||
make pip || { echo 'ERROR: Failed to build the PIP wheel.' ; exit 1; }
|
||||
@@ -3,8 +3,14 @@
|
||||
echo "EXECUTING: Build runtime - QT4"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/runtime
|
||||
if [ ${PYTHON_VERSION:0:1} == "3" ]; then
|
||||
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python3-config
|
||||
else
|
||||
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python-config
|
||||
fi
|
||||
|
||||
cd ${WORKSPACE}/runtime
|
||||
|
||||
make clean
|
||||
PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt4 || { echo 'ERROR: Failed to run the QT4 qmake step.' ; exit 1; }
|
||||
PATH=/usr/local/python-${PYTHON_VERSION}/bin:$PATH PYTHON_CONFIG=${CONFIG} /bin/qmake-qt4 || { echo 'ERROR: Failed to run the QT4 qmake step.' ; exit 1; }
|
||||
make all || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
|
||||
@@ -3,8 +3,14 @@
|
||||
echo "EXECUTING: Build runtime - QT5"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/runtime
|
||||
if [ ${PYTHON_VERSION:0:1} == "3" ]; then
|
||||
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python3-config
|
||||
else
|
||||
CONFIG=/usr/local/python-${PYTHON_VERSION}/bin/python-config
|
||||
fi
|
||||
|
||||
cd ${WORKSPACE}/runtime
|
||||
|
||||
make clean
|
||||
PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT || { echo 'ERROR: Failed to run the QT5 qmake step.' ; exit 1; }
|
||||
PATH=/usr/local/python-${PYTHON_VERSION}/bin:$PATH PYTHON_CONFIG=${CONFIG} /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT || { echo 'ERROR: Failed to run the QT5 qmake step.' ; exit 1; }
|
||||
make all || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
|
||||
@@ -3,15 +3,15 @@
|
||||
echo "EXECUTING: Build Tarballs"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE
|
||||
cd ${WORKSPACE}
|
||||
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate
|
||||
|
||||
SPHINX_VER=""
|
||||
if [ "$PYTHON_VERSION" = "2.6" -o "$PYTHON_VERSION" = "3.3" ]; then
|
||||
if [ "${PYTHON_VERSION}" = "2.6" -o "${PYTHON_VERSION}" = "3.3" ]; then
|
||||
SPHINX_VER="==1.4.9"
|
||||
fi
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install Sphinx$SPHINX_VER || { echo 'ERROR: Failed to install Sphinx to build the tarballs.' ; exit 1; }
|
||||
cd $WORKSPACE/
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install Sphinx${SPHINX_VER} || { echo 'ERROR: Failed to install Sphinx to build the tarballs.' ; exit 1; }
|
||||
cd ${WORKSPACE}/
|
||||
make src || { echo 'ERROR: Failed to build the tarballs.' ; exit 1; }
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
$WORKSPACE/ci/create_config.sh || { echo 'ERROR: Failed to create the configuration.' ; exit 1; }
|
||||
$WORKSPACE/ci/run_python_tests.sh || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
||||
$WORKSPACE/ci/run_jasmine_tests.sh || { echo 'ERROR: Error detected when running the Jasmine tests.' ; exit 1; }
|
||||
$WORKSPACE/ci/build_docs.sh || { echo 'ERROR: Failed to build the documentation.' ; exit 1; }
|
||||
$WORKSPACE/ci/build_runtime_qt4.sh || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
|
||||
$WORKSPACE/ci/build_runtime_qt5.sh || { echo 'ERROR: Failed to build the QT5 runtime.' ; exit 1; }
|
||||
$WORKSPACE/ci/update_messages.sh || { echo 'ERROR: Failed to update translation message catalogs.' ; exit 1; }
|
||||
$WORKSPACE/ci/build_pip_wheel.sh || { echo 'ERROR: Failed to build the PIP wheel.' ; exit 1; }
|
||||
$WORKSPACE/ci/build_tarballs.sh || { echo 'ERROR: Failed to build the tarballs.' ; exit 1; }
|
||||
${WORKSPACE}/ci/create_config.sh || { echo 'ERROR: Failed to create the configuration.' ; exit 1; }
|
||||
${WORKSPACE}/ci/run_python_tests.sh || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
||||
${WORKSPACE}/ci/run_jasmine_tests.sh || { echo 'ERROR: Error detected when running the Jasmine tests.' ; exit 1; }
|
||||
${WORKSPACE}/ci/build_docs.sh || { echo 'ERROR: Failed to build the documentation.' ; exit 1; }
|
||||
${WORKSPACE}/ci/build_runtime_qt4.sh || { echo 'ERROR: Failed to build the QT4 runtime.' ; exit 1; }
|
||||
${WORKSPACE}/ci/build_runtime_qt5.sh || { echo 'ERROR: Failed to build the QT5 runtime.' ; exit 1; }
|
||||
${WORKSPACE}/ci/update_messages.sh || { echo 'ERROR: Failed to update translation message catalogs.' ; exit 1; }
|
||||
${WORKSPACE}/ci/build_pip_wheel.sh || { echo 'ERROR: Failed to build the PIP wheel.' ; exit 1; }
|
||||
${WORKSPACE}/ci/build_tarballs.sh || { echo 'ERROR: Failed to build the tarballs.' ; exit 1; }
|
||||
@@ -3,13 +3,13 @@
|
||||
echo "EXECUTING: Create pgAdmin config"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE
|
||||
cd ${WORKSPACE}
|
||||
|
||||
cp $JENKINS_HOME/pgadmin-configs/config_local.py $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo LOG_FILE = \"$WORKSPACE/var/pgadmin4.log\" >> $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo SESSION_DB_PATH = \"$WORKSPACE/var/sessions\" >> $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo STORAGE_DIR = \"$WORKSPACE/var/storage\" >> $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo TEST_SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
cp ${JENKINS_HOME}/pgadmin-configs/config_local.py ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo LOG_FILE = \"${WORKSPACE}/var/pgadmin4.log\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo SESSION_DB_PATH = \"${WORKSPACE}/var/sessions\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo STORAGE_DIR = \"${WORKSPACE}/var/storage\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo SQLITE_PATH = \"${WORKSPACE}/var/pgadmin4.db\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
echo TEST_SQLITE_PATH = \"${WORKSPACE}/var/pgadmin4.db\" >> ${WORKSPACE}/web/config_local.py || { echo 'ERROR: Failed to create config_local.py.' ; exit 1; }
|
||||
|
||||
cp $JENKINS_HOME/pgadmin-configs/test_config.json $WORKSPACE/web/regression/test_config.json || { echo 'ERROR: Failed to copy the test configuration.' ; exit 1; }
|
||||
cp ${JENKINS_HOME}/pgadmin-configs/test_config.json ${WORKSPACE}/web/regression/test_config.json || { echo 'ERROR: Failed to copy the test configuration.' ; exit 1; }
|
||||
@@ -13,25 +13,25 @@ export DISPLAY=:99
|
||||
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/
|
||||
cd ${WORKSPACE}/
|
||||
|
||||
PYTHON_SUFFIX=""
|
||||
|
||||
if [[ "$PYTHON_VERSION" == 3* ]]; then
|
||||
if [[ "${PYTHON_VERSION}" == 3* ]]; then
|
||||
PYTHON_SUFFIX="3"
|
||||
fi
|
||||
|
||||
if [ "$PYTHON_VERSION" == 2.6 -o "$PYTHON_VERSION" == 3.3 ]; then
|
||||
/usr/bin/virtualenv --no-wheel -p /usr/local/python-$PYTHON_VERSION/bin/python$PYTHON_SUFFIX $WORKSPACE/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
|
||||
if [ "${PYTHON_VERSION}" == 2.6 -o "${PYTHON_VERSION}" == 3.3 ]; then
|
||||
/usr/bin/virtualenv --no-wheel -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
|
||||
else
|
||||
/usr/bin/virtualenv -p /usr/local/python-$PYTHON_VERSION/bin/python$PYTHON_SUFFIX $WORKSPACE/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
/usr/bin/virtualenv -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
fi
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
|
||||
|
||||
cd web
|
||||
/usr/bin/yarn install || { echo 'ERROR: Failed to install the required Javascript modules.' ; exit 1; }
|
||||
@@ -41,9 +41,9 @@ cd ../
|
||||
echo "Running regression tests..."
|
||||
echo
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --pkg feature_tests || { echo 'ERROR: Error detected when running the Feature tests.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/python ${WORKSPACE}/web/regression/runtests.py --pkg feature_tests || { echo 'ERROR: Error detected when running the Feature tests.' ; exit 1; }
|
||||
|
||||
echo "Cleaning up..."
|
||||
echo
|
||||
|
||||
kill $FB_PID
|
||||
kill ${FB_PID}
|
||||
@@ -3,7 +3,7 @@
|
||||
echo "EXECUTING: Jasmine tests"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/web/
|
||||
cd ${WORKSPACE}/web/
|
||||
|
||||
/usr/bin/yarn install || { echo 'ERROR: Failed to install the required Javascript modules.' ; exit 1; }
|
||||
/usr/bin/yarn run linter || { echo 'ERROR: Failed to lint the Javascript code.' ; exit 1; }
|
||||
|
||||
@@ -6,28 +6,33 @@ echo
|
||||
echo "Creating Python ${PYTHON_VERSION} virtual environment..."
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/
|
||||
cd ${WORKSPACE}/
|
||||
|
||||
PYTHON_SUFFIX=""
|
||||
|
||||
if [[ "$PYTHON_VERSION" == 3* ]]; then
|
||||
if [[ "${PYTHON_VERSION}" == 3* ]]; then
|
||||
PYTHON_SUFFIX="3"
|
||||
fi
|
||||
|
||||
if [ "$PYTHON_VERSION" == 2.6 -o "$PYTHON_VERSION" == 3.3 ]; then
|
||||
/usr/bin/virtualenv --no-wheel -p /usr/local/python-$PYTHON_VERSION/bin/python$PYTHON_SUFFIX $WORKSPACE/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
|
||||
if [ "${PYTHON_VERSION}" == 2.6 -o "${PYTHON_VERSION}" == 3.3 ]; then
|
||||
/usr/bin/virtualenv --no-wheel -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install wheel==0.29.0 || { echo 'ERROR: Failed to install wheel 0.29.0.' ; exit 1; }
|
||||
else
|
||||
/usr/bin/virtualenv -p /usr/local/python-$PYTHON_VERSION/bin/python$PYTHON_SUFFIX $WORKSPACE/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
/usr/bin/virtualenv -p /usr/local/python-${PYTHON_VERSION}/bin/python${PYTHON_SUFFIX} ${WORKSPACE}/pgadmin-venv || { echo 'ERROR: Failed to create the Python virtual environment.' ; exit 1; }
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
fi
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
|
||||
$WORKSPACE/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install -r requirements.txt || { echo 'ERROR: Failed to install the application requirements.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/pip install -r web/regression/requirements.txt || { echo 'ERROR: Failed to install the regression test requirements.' ; exit 1; }
|
||||
|
||||
echo "Running PEP-8 checks..."
|
||||
echo
|
||||
|
||||
make check-pep8 || { echo 'ERROR: Error detected when running the Python PEP-8 checks.' ; exit 1; }
|
||||
|
||||
echo "Running regression tests..."
|
||||
echo
|
||||
|
||||
$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --exclude feature_tests || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
||||
${WORKSPACE}/pgadmin-venv/bin/python ${WORKSPACE}/web/regression/runtests.py --exclude feature_tests || { echo 'ERROR: Error detected when running the Python tests.' ; exit 1; }
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
echo "EXECUTING: Compile messages"
|
||||
echo
|
||||
|
||||
cd $WORKSPACE/web
|
||||
cd ${WORKSPACE}/web
|
||||
|
||||
. $WORKSPACE/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
. ${WORKSPACE}/pgadmin-venv/bin/activate || { echo 'ERROR: Failed to activate the Python virtual environment.' ; exit 1; }
|
||||
|
||||
pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin || { echo 'ERROR: Failed to extract messages from the source code.' ; exit 1; }
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
.. _add_restore_point_dialog:
|
||||
|
||||
**********************************
|
||||
The Add named restore point Dialog
|
||||
**********************************
|
||||
***************************************
|
||||
`Add named restore point Dialog`:index:
|
||||
***************************************
|
||||
|
||||
Use the *Add named restore point* dialog to take a named snapshot of the state of the server for use in a recovery file. To create a named restore point, the server's postgresql.conf file must specify a *wal_level* value of *archive*, *hot_standby*, or *logical*. You must be a database superuser to create a restore point.
|
||||
|
||||
.. image:: images/add_restore_point.png
|
||||
:alt: Restore point dialog
|
||||
|
||||
When the *Restore point name* window launches, use the field *Enter the name of the restore point to add* to provide a descriptive name for the restore point.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _backup_and_restore:
|
||||
|
||||
******************
|
||||
Backup and Restore
|
||||
******************
|
||||
***************************
|
||||
`Backup and Restore`:index:
|
||||
***************************
|
||||
|
||||
A powerful, but user-friendly Backup and Restore tool provides an easy way to use pg_dump, pg_dumpall, and pg_restore to take backups and create copies of databases or database objects for use in a development environment.
|
||||
|
||||
|
||||
@@ -1,68 +1,73 @@
|
||||
.. _backup_dialog:
|
||||
|
||||
*****************
|
||||
The Backup Dialog
|
||||
*****************
|
||||
**********************
|
||||
`Backup Dialog`:index:
|
||||
**********************
|
||||
|
||||
Using the *pg_dump* utility, *pgAdmin* provides an easy way to create a backup in a plain-text or archived format. You can then use a client application (like *psql* or the *Query Tool*) to restore a plain-text backup file, or use the Postgres *pg_restore* utility to restore an archived backup. The *pg_dump* utility must have read access to all database objects that you want to back up.
|
||||
|
||||
You can backup a single table, a schema, or a complete database. Select the name of the backup source in the *pgAdmin* tree control, right click to open the context menu, and select *Backup...* to open the *Backup* dialog. The name of the object selected will appear in the dialog title bar.
|
||||
|
||||
.. image:: images/backup_general.png
|
||||
:alt: Backup dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to specify parameters for the backup:
|
||||
|
||||
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (...) to the right to navigate into a directory and select a file that will contain the archive.
|
||||
* Use the drop-down listbox in the *Format* field to select the format that is best suited for your application. Each format has advantages and disadvantages:
|
||||
* Use the drop-down listbox in the *Format* field to select the format that is best suited for your application. Each format has advantages and disadvantages:
|
||||
|
||||
* Select *Custom* to create a custom archive file that you can use with *pg_restore* to create a copy of a database. Custom archive file formats must be restored with *pg_restore*. This format offers the opportunity to select which database objects to restore from the backup file. *Custom* archive format is recommended for medium to large databases as it is compressed by default.
|
||||
|
||||
* Select *Tar* to generate a tar archive file that you can restore with *pg_restore*. The tar format does not support compression.
|
||||
|
||||
|
||||
* Select *Plain* to create a plain-text script file. A plain-text script file contains SQL statements and commands that you can execute at the *psql* command line to recreate the database objects and load the table data. A plain-text backup file can be edited in a text editor, if desired, before using the *psql* program to restore database objects. *Plain* format is normally recommended for smaller databases; script dumps are not recommended for blobs. The SQL commands within the script will reconstruct the database to the last saved state of the database. A plain-text script can be used to reconstruct the database on another machine, or (with modifications) on other architectures.
|
||||
|
||||
|
||||
* Select *Directory* to generate a directory-format archive suitable for use with *pg_restore*. This file format creates a directory with one file for each table and blob being dumped, plus a *Table of Contents* file describing the dumped objects in a machine-readable format that *pg_restore* can read. This format is compressed by default.
|
||||
|
||||
* Use the *Compression Ratio* field to select a compression level for the backup. Specify a value of zero to mean use no compression; specify a maximum compression value of 9. Please note that tar archives do not support compression.
|
||||
* Use the *Compression Ratio* field to select a compression level for the backup. Specify a value of zero to mean use no compression; specify a maximum compression value of 9. Please note that tar archives do not support compression.
|
||||
* Use the *Encoding* drop-down listbox to select the character encoding method that should be used for the archive.
|
||||
* Use the *Number of Jobs* field (when applicable) to specify the number of tables that will be dumped simultaneously in a parallel backup.
|
||||
* Use the dropdown listbox next to *Rolename* to specify the role that owns the backup.
|
||||
* Use the dropdown listbox next to *Rolename* to specify the role that owns the backup.
|
||||
|
||||
Click the *Dump options* tab to continue. Use the box fields in the *Dump options* tab to provide options for *pg_dump*.
|
||||
|
||||
.. image:: images/backup_sections.png
|
||||
:alt: Sections option on backup dialog
|
||||
|
||||
* Move switches in the **Sections** field box to select a portion of the object that will be backed up.
|
||||
* Move switches in the **Sections** field box to select a portion of the object that will be backed up.
|
||||
|
||||
* Move the switch next to *Pre-data* to the *Yes* position to include all data definition items not included in the data or post-data item lists.
|
||||
|
||||
* Move the switch next to *Data* to the *Yes* position to backup actual table data, large-object contents, and sequence values.
|
||||
|
||||
|
||||
* Move the switch next to *Data* to the *Yes* position to backup actual table data, large-object contents, and sequence values.
|
||||
|
||||
* Move the switch next to *Post-data* to the *Yes* position to include definitions of indexes, triggers, rules, and constraints other than validated check constraints.
|
||||
|
||||
.. image:: images/backup_objects.png
|
||||
|
||||
.. image:: images/backup_objects.png
|
||||
:alt: Type of objects option on backup dialog
|
||||
|
||||
* Move switches in the **Type of objects** field box to specify details about the type of objects that will be backed up.
|
||||
|
||||
* Move the switch next to *Only data* to the *Yes* position to limit the back up to data.
|
||||
|
||||
|
||||
* Move the switch next to *Only schema* to limit the back up to schema-level database objects.
|
||||
|
||||
* Move the switch next to *Blobs* to the *No* position to exclude large objects in the backup.
|
||||
|
||||
* Move the switch next to *Blobs* to the *No* position to exclude large objects in the backup.
|
||||
|
||||
.. image:: images/backup_do_not_save.png
|
||||
:alt: Do not save option on backup dialog
|
||||
|
||||
* Move switches in the **Do not save** field box to select the objects that will not be included in the backup.
|
||||
|
||||
* Move the switch next to *Owner* to the *Yes* position to include commands that set object ownership.
|
||||
|
||||
* Move the switch next to *Privilege* to the *Yes* position to include commands that create access privileges.
|
||||
* Move the switch next to *Privilege* to the *Yes* position to include commands that create access privileges.
|
||||
|
||||
* Move the switch next to *Tablespace* to the *Yes* position to include tablespaces.
|
||||
* Move the switch next to *Tablespace* to the *Yes* position to include tablespaces.
|
||||
|
||||
* Move the switch next to *Unlogged table data* to the *Yes* position to include the contents of unlogged tables.
|
||||
* Move the switch next to *Unlogged table data* to the *Yes* position to include the contents of unlogged tables.
|
||||
|
||||
.. image:: images/backup_queries.png
|
||||
:alt: Queries option on backup dialog
|
||||
|
||||
* Move switches in the **Queries** field box to specify the type of statements that should be included in the backup.
|
||||
|
||||
@@ -75,14 +80,16 @@ Click the *Dump options* tab to continue. Use the box fields in the *Dump option
|
||||
* Move the switch next to *Include DROP DATABASE statement* to the *Yes* position to include a command in the backup that will drop any existing database object with the same name before recreating the object during a backup.
|
||||
|
||||
.. image:: images/backup_disable.png
|
||||
:alt: Disable option on backup dialog
|
||||
|
||||
* Move switches in the **Disable** field box to specify the type of statements that should be excluded from the backup.
|
||||
|
||||
* Move the switch next to *Trigger* (active when creating a data-only backup) to the *Yes* position to include commands that will disable triggers on the target table while the data is being loaded.
|
||||
|
||||
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar quoting within function bodies; if disabled, the function body will be quoted using SQL standard string syntax.
|
||||
|
||||
|
||||
.. image:: images/backup_miscellaneous.png
|
||||
:alt: Miscellaneous option on backup dialog
|
||||
|
||||
* Move switches in the **Miscellaneous** field box to specify miscellaneous backup options.
|
||||
|
||||
@@ -94,15 +101,17 @@ Click the *Dump options* tab to continue. Use the box fields in the *Dump option
|
||||
|
||||
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes* position to include a statement that will use a SET SESSION AUTHORIZATION command to determine object ownership (instead of an ALTER OWNER command).
|
||||
|
||||
When you’ve specified the details that will be incorporated into the pg_dump command:
|
||||
When you’ve specified the details that will be incorporated into the pg_dump command:
|
||||
|
||||
* Click the *Backup* button to build and execute a command that builds a backup based on your selections on the *Backup* dialog.
|
||||
* Click the *Backup* button to build and execute a command that builds a backup based on your selections on the *Backup* dialog.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
.. image:: images/backup_messages.png
|
||||
.. image:: images/backup_messages.png
|
||||
:alt: Backup success notification popup
|
||||
|
||||
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
|
||||
|
||||
.. image:: images/backup_process_watcher.png
|
||||
|
||||
:alt: Backup process watcher
|
||||
|
||||
If the backup is unsuccessful, you can review the error messages returned by the backup command on the *Process Watcher*.
|
||||
@@ -1,29 +1,32 @@
|
||||
.. _backup_globals_dialog:
|
||||
|
||||
*************************
|
||||
The Backup Globals Dialog
|
||||
*************************
|
||||
******************************
|
||||
`Backup Globals Dialog`:index:
|
||||
******************************
|
||||
|
||||
Use the *Backup Globals* dialog to create a plain-text script that recreates all of the database objects within a cluster, and the global objects that are shared by those databases. Global objects include tablespaces, roles, and object properties. You can use the pgAdmin *Query Tool* to play back a plain-text script, and recreate the objects in the backup.
|
||||
|
||||
.. image:: images/backup_globals_general.png
|
||||
:alt: Backup globals dialog
|
||||
|
||||
Use the fields in the *General* tab to specify the following:
|
||||
|
||||
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (ellipsis) to the right to navigate into a directory and select a file that will contain the archive.
|
||||
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
|
||||
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
|
||||
|
||||
Move switches in the **Miscellaneous** field box to specify the type of statements that should be included in the backup.
|
||||
|
||||
|
||||
* Move the *Verbose messages* switch to the *No* position to exclude status messages from the backup. The default is *Yes*.
|
||||
* Move the *Force double quote on identifiers* switch to the *Yes* position to name identifiers without changing case. The default is *No*.
|
||||
|
||||
Click the *Backup* button to build and execute a command based on your selections; click the *Cancel* button to exit without saving work.
|
||||
|
||||
.. image:: images/backup_globals_messages.png
|
||||
:alt: Backup globals success notification popup
|
||||
|
||||
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
|
||||
|
||||
.. image:: images/backup_globals_process_watcher.png
|
||||
|
||||
:alt: Backup globals process watcher
|
||||
|
||||
If the backup is unsuccessful, review the error message returned by the *Process Watcher* to resolve any issue.
|
||||
@@ -1,29 +1,32 @@
|
||||
.. _backup_server_dialog:
|
||||
|
||||
*************************
|
||||
The Backup Server Dialog
|
||||
*************************
|
||||
*****************************
|
||||
`Backup Server Dialog`:index:
|
||||
*****************************
|
||||
|
||||
Use the *Backup Server* dialog to create a plain-text script that will recreate the selected server. You can use the pgAdmin *Query Tool* to play back a plain-text script, and recreate the server.
|
||||
|
||||
.. image:: images/backup_server_general.png
|
||||
:alt: Backup server dialog
|
||||
|
||||
Use the fields in the *General* tab to specify the following:
|
||||
|
||||
* Enter the name of the backup file in the *Filename* field. Optionally, select the *Browser* icon (ellipsis) to the right to navigate into a directory and select a file that will contain the archive.
|
||||
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
|
||||
* Use the drop-down listbox next to *Role name* to specify a role with connection privileges on the selected server. The role will be used for authentication during the backup.
|
||||
|
||||
Move switches in the *Miscellaneous* box to specify the type of statements that should be included in the backup.
|
||||
|
||||
|
||||
* Move the *Verbose messages* switch to the *No* position to exclude status messages from the backup. The default is *Yes*.
|
||||
* Move the *Force double quote on identifiers* switch to the *Yes* position to name identifiers without changing case. The default is *No*.
|
||||
|
||||
Click the *Backup* button to build and execute a command based on your selections; click the *Cancel* button to exit without saving work.
|
||||
|
||||
.. image:: images/backup_server_messages.png
|
||||
:alt: Backup server success notification popup
|
||||
|
||||
If the backup is successful, a popup window will confirm success. Click *Click here for details* on the popup window to launch the *Process Watcher*. The *Process Watcher* logs all the activity associated with the backup and provides additional information for troubleshooting.
|
||||
|
||||
.. image:: images/backup_server_process_watcher.png
|
||||
|
||||
:alt: Backup server process watcher
|
||||
|
||||
If the backup is unsuccessful, review the error message returned by the *Process Watcher* to resolve any issue.
|
||||
@@ -1,10 +1,10 @@
|
||||
.. _browser:
|
||||
|
||||
********************
|
||||
The pgAdmin 4 Client
|
||||
********************
|
||||
*****************************
|
||||
`The pgAdmin 4 Client`:index:
|
||||
*****************************
|
||||
|
||||
pgAdmin 4 supports all PostgreSQL features, from writing simple SQL queries to developing complex databases. It is designed to query an active database (in real-time), allowing you to stay current with modifications and implementations.
|
||||
pgAdmin 4 supports all PostgreSQL features, from writing simple SQL queries to developing complex databases. It is designed to query an active database (in real-time), allowing you to stay current with modifications and implementations.
|
||||
|
||||
Features of pgAdmin 4 include:
|
||||
|
||||
@@ -22,6 +22,7 @@ Features of pgAdmin 4 include:
|
||||
When pgAdmin opens, the interface features a menu bar and a window divided into two panes: the *Browser* tree control in the left pane, and a tabbed browser in the right pane.
|
||||
|
||||
.. image:: images/pgadmin_welcome.png
|
||||
:alt: pgAdmin4 welcome page
|
||||
|
||||
Select an icon from the *Quick Links* panel on the *Dashboard* tab to:
|
||||
|
||||
@@ -30,7 +31,7 @@ Select an icon from the *Quick Links* panel on the *Dashboard* tab to:
|
||||
|
||||
Links in the *Getting Started* panel open a new browser tab that provide useful information for Postgres users:
|
||||
|
||||
* Click the *PostgreSQL Documentation* link to navigate to the *Documentation* page for the PostgreSQL open-source project; once at the project site, you can review the manuals for the currently supported versions of the PostgreSQL server.
|
||||
* Click the *PostgreSQL Documentation* link to navigate to the *Documentation* page for the PostgreSQL open-source project; once at the project site, you can review the manuals for the currently supported versions of the PostgreSQL server.
|
||||
* Click the *pgAdmin Website* link to navigate to the pgAdmin project website. The pgAdmin site features news about recent pgAdmin releases and other project information.
|
||||
* Click the *Planet PostgreSQL* link to navigate to the blog aggregator for Postgres related blogs.
|
||||
* Click the *Community Support* link to navigate to the *Community* page at the PostgreSQL open-source project site; this page provides information about obtaining support for PostgreSQL features.
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
.. _cast_dialog:
|
||||
|
||||
***************
|
||||
The Cast Dialog
|
||||
***************
|
||||
********************
|
||||
`Cast Dialog`:index:
|
||||
********************
|
||||
|
||||
Use the *Cast* dialog to define a cast. A cast specifies how to convert a value from one data type to another.
|
||||
|
||||
The *Cast* dialog organizes the development of a cast through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Cast* dialog organizes the development of a cast through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/cast_general.png
|
||||
:alt: Cast dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the cast:
|
||||
|
||||
* The *Name* field is disabled. The name that will be displayed in the *pgAdmin* tree control is the *Source* type concatenated with the *Target* type, and is generated automatically when you make selections on the *Cast* dialog *Definition* tab.
|
||||
* The *Name* field is disabled. The name that will be displayed in the *pgAdmin* tree control is the *Source* type concatenated with the *Target* type, and is generated automatically when you make selections on the *Cast* dialog *Definition* tab.
|
||||
* Store notes about the cast in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/cast_definition.png
|
||||
:alt: Cast dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define parameters:
|
||||
|
||||
@@ -35,8 +37,9 @@ Your entries in the *Cast* dialog generate a SQL command (see an example below).
|
||||
The following is an example of the sql command generated by user selections in the *Cast* dialog:
|
||||
|
||||
.. image:: images/cast_sql.png
|
||||
:alt: Cast dialog sql tab
|
||||
|
||||
The cast uses a function named *int4(bigint)* to convert a biginteger data type to an integer.
|
||||
The cast uses a function named *int4(bigint)* to convert a biginteger data type to an integer.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.. _change_password_dialog:
|
||||
|
||||
**************************
|
||||
The Change Password Dialog
|
||||
**************************
|
||||
*******************************
|
||||
`Change Password Dialog`:index:
|
||||
*******************************
|
||||
|
||||
It is a good policy to routinely change your password to protect data, even in what you may consider a 'safe' environment. In the workplace, failure to apply an appropriate password policy could leave you in breach of Data Protection laws.
|
||||
|
||||
Please consider the following guidelines when selecting a password:
|
||||
Please consider the following guidelines when selecting a password:
|
||||
|
||||
* Ensure that your password is an adequate length; 6 characters should be the absolute minimum number of characters in the password.
|
||||
* Ensure that your password is not open to dictionary attacks. Use a mixture of upper and lower case letters and numerics, and avoid words or names. Consider using the first letter from each word in a phrase that you will remember easily but is an unfamiliar acronym.
|
||||
@@ -15,6 +15,7 @@ Please consider the following guidelines when selecting a password:
|
||||
The above should be considered a starting point: It is not a comprehensive list and it **will not guarantee security**.
|
||||
|
||||
.. image:: images/password.png
|
||||
:alt: Change database password dialog
|
||||
|
||||
Use the *Change Password* dialog to change your password:
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _change_user_password:
|
||||
|
||||
***********************************
|
||||
The Change User Password - pgAdmin4
|
||||
***********************************
|
||||
************************************
|
||||
`Change User Password Dialog`:index:
|
||||
************************************
|
||||
|
||||
It is a good policy to routinely change your password to protect data, even in what you may consider a 'safe' environment. In the workplace, failure to apply an appropriate password policy could leave you in breach of Data Protection laws.
|
||||
|
||||
@@ -15,6 +15,7 @@ Please consider the following guidelines when selecting a password:
|
||||
The above should be considered a starting point: It is not a comprehensive list and it **will not guarantee security**.
|
||||
|
||||
.. image:: images/change_user_password.png
|
||||
:alt: Change current user password dialog
|
||||
|
||||
Use the *Change Password* dialog to change your password:
|
||||
|
||||
|
||||
@@ -1,43 +1,46 @@
|
||||
.. _check_dialog:
|
||||
|
||||
****************
|
||||
The Check Dialog
|
||||
****************
|
||||
*********************
|
||||
`Check Dialog`:index:
|
||||
*********************
|
||||
|
||||
Use the *Check* dialog to define or modify a check constraint. A check constraint specifies an expression that produces a Boolean result that new or updated rows must satisfy for an insert or update operation to succeed.
|
||||
Use the *Check* dialog to define or modify a check constraint. A check constraint specifies an expression that produces a Boolean result that new or updated rows must satisfy for an insert or update operation to succeed.
|
||||
|
||||
The *Check* dialog organizes the development of a check constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Check* dialog organizes the development of a check constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/check_general.png
|
||||
:alt: Check dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the check constraint:
|
||||
|
||||
* Use the *Name* field to provide a descriptive name for the check constraint that will be displayed in the *pgAdmin* tree control. With PostgreSQL 9.5 forward, when a table has multiple check constraints, they will be tested for each row in alphabetical order by name and after NOT NULL constraints.
|
||||
* Store notes about the check constraint in the *Comment* field.
|
||||
* Store notes about the check constraint in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/check_definition.png
|
||||
:alt: Check dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the check constraint:
|
||||
|
||||
* Provide the expression that a row must satisfy in the *Check* field.
|
||||
* Move the *No Inherit?* switch to the *Yes* position to specify this constraint is automatically inherited by a table's children. The default is *No*.
|
||||
* Move the *No Inherit?* switch to the *Yes* position to specify this constraint is automatically inherited by a table's children. The default is *No*.
|
||||
* Move the *Don't validate?* switch to the *No* position to skip validation of existing data; the constraint may not hold for all rows in the table. The default is *Yes*.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Check* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Check* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Check* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Check* dialog:
|
||||
|
||||
.. image:: images/check_sql.png
|
||||
:alt: Check dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a check constraint named *check_price* on the *price* column of the *products* table. The constraint confirms that any values added to the column are greater than 0.
|
||||
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _code_overview:
|
||||
|
||||
*************
|
||||
Code Overview
|
||||
*************
|
||||
**********************
|
||||
`Code Overview`:index:
|
||||
**********************
|
||||
|
||||
The bulk of pgAdmin is a Python web application written using the Flask framework
|
||||
on the backend, and HTML5 with CSS3, Bootstrap and jQuery on the front end. A
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
.. _code_review:
|
||||
|
||||
*****************
|
||||
Code Review Notes
|
||||
*****************
|
||||
**************************
|
||||
`Code Review Notes`:index:
|
||||
**************************
|
||||
|
||||
This document lists a number of standard items that will be checked during the
|
||||
review process for any patches submitted for inclusion in pgAdmin.
|
||||
|
||||
* Ensure all code follows the pgAdmin :doc:`coding_standards`.
|
||||
|
||||
* Ensure all code has unit test coverage and API/feature test coverage where
|
||||
appropriate.
|
||||
|
||||
* Copyright years must be correct and properly formatted (to make it easy to make
|
||||
bulk updates every year). The start date should always be 2013, and the end year
|
||||
the current year, e.g.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _coding_standards:
|
||||
|
||||
****************
|
||||
Coding Standards
|
||||
****************
|
||||
*************************
|
||||
`Coding Standards`:index:
|
||||
*************************
|
||||
|
||||
pgAdmin uses multiple technologies and multiple languages, each of which have
|
||||
their own coding standards.
|
||||
@@ -106,6 +106,9 @@ Note the use of a descriptive function name, using the underscore character to
|
||||
separate words in all lower case, and short but descriptive lower case variable
|
||||
names.
|
||||
|
||||
.. note:: From version 3.0 onwards, new or refactored code should be written using
|
||||
ES6 features and conventions.
|
||||
|
||||
C++
|
||||
---
|
||||
|
||||
|
||||
@@ -1,50 +1,53 @@
|
||||
.. _collation_dialog:
|
||||
|
||||
********************
|
||||
The Collation Dialog
|
||||
********************
|
||||
*************************
|
||||
`Collation Dialog`:index:
|
||||
*************************
|
||||
|
||||
Use the *Collation* dialog to define a collation. A collation is an SQL schema object that maps a SQL name to operating system locales. To create a collation, you must have a CREATE privilege on the destination schema.
|
||||
|
||||
The *Collation* dialog organizes the development of a collation through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Collation* dialog organizes the development of a collation through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/collation_general.png
|
||||
:alt: Collation dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the collation:
|
||||
|
||||
* Use the *Name* field to provide a name for the collation. The collation name must be unique within a schema. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Select the name of the owner from the drop-down listbox in the *Owner* field.
|
||||
* Select the name of the owner from the drop-down listbox in the *Owner* field.
|
||||
* Select the name of the schema in which the collation will reside from the drop-down listbox in the *Schema* field.
|
||||
* Store notes about the collation in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/collation_definition.png
|
||||
:alt: Collation dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to specify the operating system locale settings:
|
||||
Use the fields in the *Definition* tab to specify the operating system locale settings:
|
||||
|
||||
* Use the drop-down listbox next to *Copy collation* to select the name of an existing collation to copy. The new collation will have the same properties as the existing one, but will be an independent object. If you choose to copy an existing collation, you cannot modify the collation properties displayed on this tab.
|
||||
* Use the *Locale* field to specify a locale; a locale specifies language and language formatting characteristics. If you specify this, you cannot specify either of the following parameters. To view a list of locales supported by your Linux system use the command *locale -a*.
|
||||
* Use the *LC_COLLATE* field to specify a locale with specified string sort order. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
|
||||
* Use the *LC_CTYPE* field to specify a locale with specified character classification. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
|
||||
* Use the *LC_COLLATE* field to specify a locale with specified string sort order. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
|
||||
* Use the *LC_CTYPE* field to specify a locale with specified character classification. The locale must be applicable to the current database encoding. (See CREATE DATABASE for details.)
|
||||
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Collation* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Collation* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Collation* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Collation* dialog:
|
||||
|
||||
.. image:: images/collation_sql.png
|
||||
:alt: Collation dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a collation named *french* that uses the rules specified for the locale, *fr_FR.utf8. The collation is owned by *postgres*.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. For more information about setting a locale, see Chapter 22.1 Locale Support of the PostgreSQL core documentation:
|
||||
|
||||
http://www.postgresql.org/docs/9.5/static/locale.html
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation. For more information about setting a locale, see Chapter 22.1 Locale Support of the PostgreSQL core documentation:
|
||||
|
||||
http://www.postgresql.org/docs/9.5/static/locale.html
|
||||
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to restore configuration parameters.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _column_dialog:
|
||||
|
||||
*****************
|
||||
The Column Dialog
|
||||
*****************
|
||||
**********************
|
||||
`Column Dialog`:index:
|
||||
**********************
|
||||
|
||||
Use the *Column* dialog to add a column to an existing table or modify a column definition.
|
||||
|
||||
The *Column* dialog organizes the development of a column through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
The *Column* dialog organizes the development of a column through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/column_general.png
|
||||
:alt: Column dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the column:
|
||||
|
||||
@@ -18,6 +19,7 @@ Use the fields in the *General* tab to identify the column:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/column_definition.png
|
||||
:alt: Column dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to add parameters for the column. (Fields are disabled if inapplicable.)
|
||||
|
||||
@@ -30,41 +32,44 @@ Use the fields in the *Definition* tab to add parameters for the column. (Fields
|
||||
Click the *Variables* tab to continue.
|
||||
|
||||
.. image:: images/column_variables.png
|
||||
:alt: Column dialog variables tab
|
||||
|
||||
Use the *Variables* tab to to specify the number of distinct values that may be present in the column; this value overrides estimates made by the ANALYZE command. Click the *Add* icon (+) to add a *Name*/*Value* pair:
|
||||
|
||||
* Select the name of the variable from the drop-down listbox in the *Name* field.
|
||||
|
||||
* Select *n_distinct* to specify the number of distinct values for the column.
|
||||
* Select the name of the variable from the drop-down listbox in the *Name* field.
|
||||
|
||||
* Select *n_distinct* to specify the number of distinct values for the column.
|
||||
* Select *n_distinct_inherited* to specify the number of distinct values for the table and its children.
|
||||
|
||||
* Specify the number of distinct values in the *Value* field. For more information, see the documentation for `ALTER TABLE <http://www.postgresql.org/docs/9.6/static/sql_altertable.html>`_.
|
||||
* Specify the number of distinct values in the *Value* field. For more information, see the documentation for `ALTER TABLE <http://www.postgresql.org/docs/9.6/static/sql_altertable.html>`_.
|
||||
|
||||
Click the *Add* icon (+) to specify each additional *Name*/*Value* pair; to discard a variable, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/column_security.png
|
||||
:alt: Column dialog security tab
|
||||
|
||||
Use the *Security* tab to assign attributes and define security labels. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security* tab to assign attributes and define security labels. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Column* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Column* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Column* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Column* dialog:
|
||||
|
||||
.. image:: images/column_sql.png
|
||||
:alt: Column dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a column named *territory* in the table named *distributors*.
|
||||
|
||||
The example shown demonstrates creating a column named *territory* in the table named *distributors*.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
.. _connect_error:
|
||||
|
||||
******************
|
||||
`Connection error`
|
||||
******************
|
||||
*************************
|
||||
`Connection error`:index:
|
||||
*************************
|
||||
|
||||
When connecting to a PostgreSQL server, you may get an error message. If you encounter an error message, please review the message carefully; each error message attempts to incorporate the information you'll need to resolve the problem. For more details about specific errors, please locate the error message in the list below:
|
||||
|
||||
**Connection to the server has been lost**
|
||||
|
||||
.. image:: images/ce_timeout.png
|
||||
:alt: Connection to the server has been lost
|
||||
|
||||
This error message indicates that the connection attempt has taken longer than the specified threshold; there may be a problem with the connection properties provided on the *Server* dialog, network connectivity issues, or the server may not be running.
|
||||
|
||||
**could not connect to Server: Connection refused**
|
||||
**could not connect to Server: Connection refused**
|
||||
|
||||
.. image:: images/ce_not_running.png
|
||||
:alt: Could not connect to server
|
||||
|
||||
If pgAdmin displays this message, there are two possible reasons for this:
|
||||
If pgAdmin displays this message, there are two possible reasons for this:
|
||||
* the database server isn't running - simply start it.
|
||||
* the server isn't configured to accept TCP/IP requests on the address shown.
|
||||
|
||||
@@ -27,12 +29,13 @@ For further information, please refer to the PostgreSQL documentation about `run
|
||||
**FATAL: no pg_hba.conf entry**
|
||||
|
||||
.. image:: images/ce_error_hba.png
|
||||
:alt: No pg_hba.conf entry
|
||||
|
||||
If pgAdmin displays this message when connecting, your server can be contacted correctly over the network, but is not configured to accept your connection. Your client has not been detected as a legal user for the database.
|
||||
If pgAdmin displays this message when connecting, your server can be contacted correctly over the network, but is not configured to accept your connection. Your client has not been detected as a legal user for the database.
|
||||
|
||||
To connect to a server, the pg_hba.conf file on the database server must be configured to accept connections from the host of the pgAdmin client. Modify the pg_hba.conf file on the database server host, and add an entry in the form:
|
||||
|
||||
* **host template1 postgres 192.168.0.0/24 md5** for an IPV4 network
|
||||
* **host template1 postgres 192.168.0.0/24 md5** for an IPV4 network
|
||||
* **host template1 postgres ::ffff:192.168.0.0/120 md5** for an IPV6 network
|
||||
|
||||
For more information, please refer to the PostgreSQL documentation about `client authentication <http://www.postgresql.org/docs/current/interactive/client-authentication.html>`_.
|
||||
@@ -40,7 +43,8 @@ For more information, please refer to the PostgreSQL documentation about `client
|
||||
**FATAL: password authentication failed**
|
||||
|
||||
.. image:: images/ce_password_failed.png
|
||||
|
||||
:alt: Password authentication failed
|
||||
|
||||
* The *password authentication failed for user* error message indicates there may be a problem with the password you entered. Retry the password to confirm you entered it correctly. If the error message returns, make sure that you have the correct password, that you are authorized to access the server, and that the access has been correctly configured in the server's postgresql.conf configuration file.
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
.. _connect_to_server:
|
||||
|
||||
*****************
|
||||
Connect to server
|
||||
*****************
|
||||
**************************
|
||||
`Connect to server`:index:
|
||||
**************************
|
||||
|
||||
Use the *Connect to Server* dialog to authenticate with a defined server and access the objects stored on the server through the pgAdmin tree control. To access the dialog, right click on the server name in the *pgAdmin* tree control, and select *Connect Server...* from the context menu.
|
||||
|
||||
.. image:: images/connect_to_server.png
|
||||
:alt: Connect to server dialog
|
||||
|
||||
Provide authentication information for the selected server:
|
||||
|
||||
* Use the *Password* field to provide the password of the user that is associated with the defined server.
|
||||
* Check the box next to *Save Password* to instruct the server to save the password for future connections; if you save the password, you will not be prompted when reconnecting to the database server with this server definition.
|
||||
|
||||
|
||||
The pgAdmin client displays a message in a green status bar in the lower right corner when the server connects successfully.
|
||||
|
||||
If you receive an error message while attempting a connection, verify that your network is allowing the pgAdmin host and the host of the database server to communicate. For detailed information about a specific error message, please see the :ref:`Connection Error <connect_error>` help page.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _connecting:
|
||||
|
||||
**********************
|
||||
Connecting to a Server
|
||||
**********************
|
||||
*******************************
|
||||
`Connecting to a Server`:index:
|
||||
*******************************
|
||||
|
||||
Before you can use the pgAdmin client to manage the objects that reside on your Postgres server, you must define a connection to the server. You can (optionally) use the *Server Group* dialog to create server groups to organize the server connections within the tree control for easier management. To open the *Server Group* dialog, right-click on the *Servers* node of the tree control, and select *Server Group* from the *Create* menu.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _contributions:
|
||||
|
||||
*****************************
|
||||
pgAdmin Project Contributions
|
||||
*****************************
|
||||
**************************************
|
||||
`pgAdmin Project Contributions`:index:
|
||||
**************************************
|
||||
|
||||
pgAdmin is an open-source project that invites you to get involved in the development process. For more information about contributing to the pgAdmin project, contact the developers on the pgAdmin mailing list pgadmin-hackers@postgresql.org to discuss any ideas you might have for enhancements or bug fixes.
|
||||
|
||||
|
||||
@@ -1,39 +1,42 @@
|
||||
.. _database_dialog:
|
||||
|
||||
*******************
|
||||
The Database Dialog
|
||||
*******************
|
||||
************************
|
||||
`Database Dialog`:index:
|
||||
************************
|
||||
|
||||
Use the *Database* dialog to define or modify a database. To create a database, you must be a database superuser or have the CREATE privilege.
|
||||
Use the *Database* dialog to define or modify a database. To create a database, you must be a database superuser or have the CREATE privilege.
|
||||
|
||||
The *Database* dialog organizes the development of a database through the following dialog tabs: *General*, *Definition*, *Security*, and *Parameters*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Database* dialog organizes the development of a database through the following dialog tabs: *General*, *Definition*, *Security*, and *Parameters*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/database_general.png
|
||||
:alt: Database dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the database:
|
||||
|
||||
* Use the *Database* field to add a descriptive name for the database. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Select the owner of the database from the drop-down listbox in the *Owner* field.
|
||||
* Store notes about the database in the *Comment* field.
|
||||
* Select the owner of the database from the drop-down listbox in the *Owner* field.
|
||||
* Store notes about the database in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/database_definition.png
|
||||
:alt: Database dialog definition tab
|
||||
|
||||
Use the *Definition* tab to set properties for the database:
|
||||
|
||||
* Select a character set from the drop-down listbox in the *Encoding* field. The default is *UTF8*.
|
||||
* Select a template from the drop-down listbox in the *Template* field. If you do not specify a template, the database will use template1.
|
||||
* Select a tablespace from the drop-down listbox in the *Tablespace* field. The selected tablespace will be the default tablespace used to contain database objects.
|
||||
* Select a template from the drop-down listbox in the *Template* field. If you do not specify a template, the database will use template1.
|
||||
* Select a tablespace from the drop-down listbox in the *Tablespace* field. The selected tablespace will be the default tablespace used to contain database objects.
|
||||
* Select the collation order from the drop-down listbox in the *Collation* field.
|
||||
* Select the character classification from the drop-down listbox in the *Character Type* field. This affects the categorization of characters, e.g. lower, upper and digit. The default, or a blank field, uses the character classification of the template database.
|
||||
* Specify a connection limit in the *Connection Limit* field to configure the maximum number of connection requests. The default value (*-1*) allows unlimited connections to the database.
|
||||
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/database_security.png
|
||||
:alt: Database dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for database objects:
|
||||
|
||||
@@ -43,16 +46,17 @@ Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
|
||||
|
||||
Click add to set additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the database. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the database. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
To discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Parameters* tab to continue.
|
||||
|
||||
.. image:: images/database_parameters.png
|
||||
:alt: Database dialog parameters tab
|
||||
|
||||
Use the *Parameters* tab to set parameters for the database. Click the *Add* icon (+) to add each parameter:
|
||||
|
||||
@@ -68,12 +72,13 @@ Your entries in the *Database* dialog generate a SQL command (see an example bel
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Database* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Database* dialog:
|
||||
|
||||
.. image:: images/database_sql.png
|
||||
:alt: Database dialog sql tab
|
||||
|
||||
The example creates a database named *hr* that is owned by *postgres*. It allows unlimited connections, and is available to all authenticated users.
|
||||
|
||||
The example creates a database named *hr* that is owned by *postgres*. It allows unlimited connections, and is available to all authenticated users.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
.. _debugger:
|
||||
|
||||
******************
|
||||
`pgAdmin Debugger`
|
||||
******************
|
||||
*************************
|
||||
`pgAdmin Debugger`:index:
|
||||
*************************
|
||||
|
||||
.. image:: images/debug_main.png
|
||||
:alt: Debugger page
|
||||
|
||||
The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as EDB-SPL functions, stored procedures and packages in Advanced Server. The Debugger is available as an extension for your PostgreSQL installation, and is distributed as part of Advanced Server. You must have superuser privileges to use the debugger.
|
||||
The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as EDB-SPL functions, stored procedures and packages in Advanced Server. The Debugger is available as an extension for your PostgreSQL installation, and is distributed as part of Advanced Server. You must have superuser privileges to use the debugger.
|
||||
|
||||
Before using the debugger, you must modify the *postgresql.conf* file, adding the server-side debugger components to the the value of the *shared_preload_libraries* parameter:
|
||||
|
||||
shared_preload_libraries = '$libdir/*other_libraries*/plugin_debugger'
|
||||
|
||||
|
||||
After modifying the *shared_preload_libraries* parameter, restart the server to apply the changes.
|
||||
|
||||
The debugger may be used for either in-context debugging or direct debugging of a target function or procedure. When you use the debugger for in-context debugging, you set a breakpoint at the first line of a program; when a session invokes the target, control is transferred to the debugger. When using direct debugging, the debugger prompts you for any parameters required by the target, and then allows you to step through the code.
|
||||
@@ -21,10 +22,12 @@ The debugger may be used for either in-context debugging or direct debugging of
|
||||
To set a breakpoint at the first line of a program, right-click the name of the object you would like to debug, and select *Set breakpoint* from the *Debugging* sub-menu. The debugger window will open, waiting for another session to invoke the program.
|
||||
|
||||
.. image:: images/debug_set_breakpoint.png
|
||||
:alt: Debugger set a breakpoint demo
|
||||
|
||||
When another session invokes the target, the debugger will display the code, allowing you to add break points, or step through line-by-line. The other session is suspended until the debugging completes; then control is returned to the session.
|
||||
|
||||
.. image:: images/debug_ic_step_in.png
|
||||
:alt: Debugger step-in demo
|
||||
|
||||
|
||||
**Direct Debugging**
|
||||
@@ -32,6 +35,7 @@ When another session invokes the target, the debugger will display the code, all
|
||||
To use the debugger for direct debugging, right click on the name of the object that you wish to debug in the pgAdmin tree control and select *Debug* from the *Debugging* sub-menu. The debugger window will open, prompting you for any values required by the program:
|
||||
|
||||
.. image:: images/debug_params.png
|
||||
:alt: Debugger parameter dialog
|
||||
|
||||
Use the fields on the *Debugger* dialog to provide a value for each parameter:
|
||||
|
||||
@@ -39,13 +43,14 @@ Use the fields on the *Debugger* dialog to provide a value for each parameter:
|
||||
* The *Type* field contains the parameter data type.
|
||||
* Check the *Null?* checkbox to indicate that the parameter is a NULL value.
|
||||
* Check the *Expression?* checkbox if the Value field contains an expression.
|
||||
* Use the *Value* field to provide the parameter value that will be passed to the program. When entering parameter values, type the value into the appropriate cell on the grid, or, leave the cell empty to represent NULL, enter '' (two single quotes) to represent an empty string, or to enter a literal string consisting of just two single quotes, enter \'\'. PostgreSQL 8.4 and above supports variadic function parameters. These may be entered as a comma-delimited list of values, quoted and/or cast as required.
|
||||
* Use the *Value* field to provide the parameter value that will be passed to the program. When entering parameter values, type the value into the appropriate cell on the grid, or, leave the cell empty to represent NULL, enter '' (two single quotes) to represent an empty string, or to enter a literal string consisting of just two single quotes, enter \'\'. PostgreSQL 8.4 and above supports variadic function parameters. These may be entered as a comma-delimited list of values, quoted and/or cast as required.
|
||||
* Check the *Use default?* checkbox to indicate that the program should use the value in the Default Value field.
|
||||
* The *Default Value* field contains the default value of the parameter.
|
||||
* The *Default Value* field contains the default value of the parameter.
|
||||
|
||||
Provide values required by the program, and click the *Debug* button to start stepping through the program.
|
||||
Provide values required by the program, and click the *Debug* button to start stepping through the program.
|
||||
|
||||
.. image:: images/debug_step_in.png
|
||||
:alt: Debugger step-in demo
|
||||
|
||||
|
||||
**Using the Debugger**
|
||||
@@ -53,6 +58,7 @@ Provide values required by the program, and click the *Debug* button to start st
|
||||
The main debugger window consists of two panels and a context-sensitive toolbar. Use toolbar icons to manage breakpoints and step into or through code; hover over an icon for a tooltip that identifies the option associated with the icon. The toolbar options are:
|
||||
|
||||
.. image:: images/debug_toolbar.png
|
||||
:alt: Debugger navigation toolbar
|
||||
|
||||
+-------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| Option | Action |
|
||||
@@ -72,9 +78,10 @@ The main debugger window consists of two panels and a context-sensitive toolbar.
|
||||
| *Stop* | Click the *Stop* icon to halt the execution of a program. |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
|
||||
The top panel of the debugger window displays the program body; click in the grey margin next to a line number to add a breakpoint. The highlighted line in the top panel is the line that is about to execute.
|
||||
The top panel of the debugger window displays the program body; click in the grey margin next to a line number to add a breakpoint. The highlighted line in the top panel is the line that is about to execute.
|
||||
|
||||
.. image:: images/debug_main.png
|
||||
:alt: Debugger main window
|
||||
|
||||
The lower panel of the debugger window provides a set of tabs that allow you to review information about the program:
|
||||
|
||||
@@ -87,14 +94,17 @@ The lower panel of the debugger window provides a set of tabs that allow you to
|
||||
As you step through a program, the *Local variables* tab displays the current value of each variable:
|
||||
|
||||
.. image:: images/debug_variables.png
|
||||
:alt: Debugger local variables tab
|
||||
|
||||
When you step into a subroutine, the *Stack* tab displays the call stack, including the name of each caller, the parameter values for each caller (if any), and the line number within each caller:
|
||||
|
||||
.. image:: images/debug_stack.png
|
||||
:alt: Debugger local stack tab
|
||||
|
||||
Select a caller to change focus to that stack frame and display the state of the caller in the upper panel.
|
||||
|
||||
When the program completes, the *Results* tab displays the message returned by the server. If the program encounters an error, the *Messages* tab displays details:
|
||||
|
||||
.. image:: images/debug_error_message.png
|
||||
:alt: Debugger error message
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _deployment:
|
||||
|
||||
******************
|
||||
pgAdmin Deployment
|
||||
******************
|
||||
***************************
|
||||
`pgAdmin Deployment`:index:
|
||||
***************************
|
||||
|
||||
Pre-compiled and configured installation packages for pgAdmin 4 are available for a number of desktop environments; we recommend using an installer whenever possible. If you are interested in learning more about the project, or if a pgAdmin installer is not available for your environment, the pages listed below will provide detailed information about creating a custom deployment.
|
||||
|
||||
|
||||
@@ -1,17 +1,32 @@
|
||||
.. _desktop_deployment:
|
||||
|
||||
******************
|
||||
Desktop Deployment
|
||||
******************
|
||||
***************************
|
||||
`Desktop Deployment`:index:
|
||||
***************************
|
||||
|
||||
pgAdmin may be deployed as a desktop application by configuring the application
|
||||
to run in desktop mode and then utilising the desktop runtime to host and
|
||||
display the program on a supported Windows, Mac OS X or Linux installation.
|
||||
to run in desktop mode and then utilising the desktop runtime to host the
|
||||
program on a supported Windows, Mac OS X or Linux installation.
|
||||
|
||||
**Note: Pre-compiled and configured installation packages are available for
|
||||
a number of platforms. These packages should be used by end-users whereever
|
||||
possible - the following information is useful for the maintainers of those
|
||||
packages and users interested in understanding how pgAdmin works.**
|
||||
The desktop runtime is a system-tray application that when launched, runs the
|
||||
pgAdmin server and launches a web browser to render the user interface. If
|
||||
additional instances of pgAdmin are launched, a new browser tab will be opened
|
||||
and be served by the existing instance of the server in order to minimise system
|
||||
resource utilisation. Clicking the icon in the system tray will present a menu
|
||||
offering options to open a new pgAdmin window, configure the runtime, view the
|
||||
server log and shut down the server.
|
||||
|
||||
.. note:: Pre-compiled and configured installation packages are available for
|
||||
a number of platforms. These packages should be used by end-users whereever
|
||||
possible - the following information is useful for the maintainers of those
|
||||
packages and users interested in understanding how pgAdmin works.
|
||||
|
||||
.. seealso:: For detailed instructions on building and configuring pgAdmin from
|
||||
scratch, please see the README file in the top level directory of the source code.
|
||||
For convenience, you can find the latest version of the file
|
||||
`here <https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob_plain;f=README>`_,
|
||||
but be aware that this may differ from the version included with the source code
|
||||
for a specific version of pgAdmin.
|
||||
|
||||
Configuration
|
||||
*************
|
||||
@@ -36,10 +51,10 @@ are as follows:
|
||||
for end users to change any default or packaging specific settings that they may
|
||||
wish to adjust to meet local preferences or standards.
|
||||
|
||||
NOTE: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
|
||||
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
|
||||
and STORAGE_DIR values as well as they will have been set based on the default
|
||||
configuration or overridden by the runtime.
|
||||
.. note:: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
|
||||
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
|
||||
and STORAGE_DIR values as well as they will have been set based on the default
|
||||
configuration or overridden by the runtime.
|
||||
|
||||
Runtime
|
||||
-------
|
||||
@@ -53,7 +68,7 @@ semi-colon character, for example:
|
||||
.. code-block:: bash
|
||||
|
||||
/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/;/Users/dpage/python-libs/
|
||||
|
||||
|
||||
The configuration settings are stored using the QSettings class in Qt, which
|
||||
will use an INI file on Unix systems (~/.config/pgadmin/pgadmin4.conf),
|
||||
a plist file on Mac OS X (~/Library/Preferences/org.pgadmin.pgadmin4.plist),
|
||||
@@ -75,4 +90,4 @@ The configuration settings:
|
||||
| Browser/WindowState | Binary | The runtime window's state |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| Browser/Zoom | String | The runtime window's zoom level (zoom % / 100) |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _developer_tools:
|
||||
|
||||
***************
|
||||
Developer Tools
|
||||
***************
|
||||
************************
|
||||
`Developer Tools`:index:
|
||||
************************
|
||||
|
||||
The pgAdmin *Tools* menu displays a list of powerful developer tools that you can use to execute and analyze complex SQL commands, manage data, and debug PL/SQL code.
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
.. _domain_constraint_dialog:
|
||||
|
||||
*****************************
|
||||
The Domain Constraints Dialog
|
||||
*****************************
|
||||
**********************************
|
||||
`Domain Constraints Dialog`:index:
|
||||
**********************************
|
||||
|
||||
Use the *Domain Constraints* dialog to create or modify a domain constraint. A domain constraint confirms that the values provided for a domain meet a defined criteria. The *Domain Constraints* dialog implements options of the ALTER DOMAIN command.
|
||||
Use the *Domain Constraints* dialog to create or modify a domain constraint. A domain constraint confirms that the values provided for a domain meet a defined criteria. The *Domain Constraints* dialog implements options of the ALTER DOMAIN command.
|
||||
|
||||
The *Domain Constraints* dialog organizes the development of a domain constraint through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Domain Constraints* dialog organizes the development of a domain constraint through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/domain_constraint_general.png
|
||||
|
||||
:alt: Domain constraint dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the domain constraint:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the constraint. The name will be displayed in the *pgAdmin* tree control.
|
||||
@@ -18,11 +19,12 @@ Use the fields in the *General* tab to identify the domain constraint:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/domain_constraint_definition.png
|
||||
|
||||
:alt: Domain constraint dialog general tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the domain constraint:
|
||||
|
||||
* Use the *Check* field to provide a CHECK expression. A CHECK expression specifies a constraint that the domain must satisfy. A constraint must produce a Boolean result; include the key word VALUE to refer to the value being tested. Only those expressions that evaluate to TRUE or UNKNOWN will succeed. A CHECK expression cannot contain subqueries or refer to variables other than VALUE. If a domain has multiple CHECK constraints, they will be tested in alphabetical order.
|
||||
* Move the *Validate?* switch to the *No* position to mark the constraint NOT VALID. If the constraint is marked NOT VALID, the constraint will not be applied to existing column data. The default value is *Yes*.
|
||||
* Move the *Validate?* switch to the *No* position to mark the constraint NOT VALID. If the constraint is marked NOT VALID, the constraint will not be applied to existing column data. The default value is *Yes*.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
@@ -30,16 +32,17 @@ Your entries in the *Domain Constraints* dialog generate a SQL command (see an e
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Domain Constraints* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Domain Constraints* dialog:
|
||||
|
||||
.. image:: images/domain_constraint_sql.png
|
||||
:alt: Domain constraint dialog general tab
|
||||
|
||||
The example shown demonstrates creating a domain constraint on the domain *timesheets* named *weekday*. It constrains a value to equal *Friday*.
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to restore configuration parameters.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _domain_dialog:
|
||||
|
||||
*****************
|
||||
The Domain Dialog
|
||||
*****************
|
||||
**********************
|
||||
`Domain Dialog`:index:
|
||||
**********************
|
||||
|
||||
Use the *Domain* dialog to define a domain. A domain is a data type definition that may constrain permissible values. Domains are useful when you are creating multiple tables that contain comparable columns; you can create a domain that defines constraints that are common to the columns and re-use the domain definition when creating the columns, rather than individually defining each set of constraints.
|
||||
Use the *Domain* dialog to define a domain. A domain is a data type definition that may constrain permissible values. Domains are useful when you are creating multiple tables that contain comparable columns; you can create a domain that defines constraints that are common to the columns and re-use the domain definition when creating the columns, rather than individually defining each set of constraints.
|
||||
|
||||
The *Domain* dialog organizes the development of a domain through the following tabs: *General*, *Definition*, *Constraints*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Domain* dialog organizes the development of a domain through the following tabs: *General*, *Definition*, *Constraints*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/domain_general.png
|
||||
:alt: Domain dialog general tab
|
||||
|
||||
Use the fields on the *General* tab to identify a domain:
|
||||
|
||||
@@ -20,6 +21,7 @@ Use the fields on the *General* tab to identify a domain:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/domain_definition.png
|
||||
:alt: Domain dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to describe the domain:
|
||||
|
||||
@@ -28,25 +30,27 @@ Use the fields in the *Definition* tab to describe the domain:
|
||||
* Use the context-sensitive *Precision* field to specify the total count of significant digits for a numeric type.
|
||||
* Specify a default value for the domain data type in the *Default* field. The data type of the default expression must match the data type of the domain. If no default value is specified, then the default value is the null value.
|
||||
* Move the *Not Null* switch to specify the values of this domain are prevented from being null.
|
||||
* Use the drop-down listbox next to *Collation* to apply a collation cast. If no collation is specified, the underlying data type's default collation is used. The underlying type must be collatable if COLLATE is specified.
|
||||
* Use the drop-down listbox next to *Collation* to apply a collation cast. If no collation is specified, the underlying data type's default collation is used. The underlying type must be collatable if COLLATE is specified.
|
||||
|
||||
Click the *Constraints* tab to continue.
|
||||
|
||||
.. image:: images/domain_constraints.png
|
||||
:alt: Domain dialog constraints tab
|
||||
|
||||
Use the fields in the *Constraints* tab to specify rules for the domain. Click the *Add* icon (+) to set constraints:
|
||||
|
||||
* Use the *Name* field to specify a name for the constraint.
|
||||
* Use the *Check* field to provide an expression for the constraint.
|
||||
* Use the *Validate* checkbox to determine whether the constraint will be validated. The default checkbox is checked and sets a validation requirement.
|
||||
* Use the *Validate* checkbox to determine whether the constraint will be validated. The default checkbox is checked and sets a validation requirement.
|
||||
|
||||
A CHECK clause specifies an integrity test which values of the domain must satisfy. Each constraint must be an expression that produces a Boolean result. Use the key word VALUE to refer to the value being tested. Expressions evaluating to TRUE or UNKNOWN succeed. If the expression produces a FALSE result, an error is reported and the value is not allowed to be converted to the domain type. A CHECK expression cannot contain subqueries nor refer to variables other than VALUE. If a domain has multiple CHECK constraints, they will be tested in alphabetical order by name.
|
||||
A CHECK clause specifies an integrity test which values of the domain must satisfy. Each constraint must be an expression that produces a Boolean result. Use the key word VALUE to refer to the value being tested. Expressions evaluating to TRUE or UNKNOWN succeed. If the expression produces a FALSE result, an error is reported and the value is not allowed to be converted to the domain type. A CHECK expression cannot contain subqueries nor refer to variables other than VALUE. If a domain has multiple CHECK constraints, they will be tested in alphabetical order by name.
|
||||
|
||||
Click the *Add* icon (+) to set additional constraints; to discard a constraint, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/domain_security.png
|
||||
:alt: Domain dialog security tab
|
||||
|
||||
Use the *Security Labels* panel to assign security labels. Click the *Add* icon (+) to add a label:
|
||||
|
||||
@@ -61,12 +65,13 @@ Your entries in the *Domain* dialog generate a SQL command (see an example below
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by selections made in the *Domain* dialog:
|
||||
The following is an example of the sql command generated by selections made in the *Domain* dialog:
|
||||
|
||||
.. image:: images/domain_sql.png
|
||||
:alt: Domain dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a domain named *minimum-wage* that confirms that the value entered is greater than or equal to *7.25*.
|
||||
|
||||
The example shown demonstrates creating a domain named *minimum-wage* that confirms that the value entered is greater than or equal to *7.25*.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -5,22 +5,24 @@
|
||||
`Reviewing and Editing Data`:index:
|
||||
***********************************
|
||||
|
||||
To review or modify data, right click on a table or view name in the *Browser* tree control. When the context menu opens, use the *View/Edit Data* menu to specify the number of rows you would like to display in the editor panel.
|
||||
To review or modify data, right click on a table or view name in the *Browser* tree control. When the context menu opens, use the *View/Edit Data* menu to specify the number of rows you would like to display in the editor panel.
|
||||
|
||||
.. image:: images/editgrid.png
|
||||
:alt: Edit grid window
|
||||
|
||||
To modify the content of a table, each row in the table must be uniquely identifiable. If the table definition does not include an OID or a primary key, the displayed data is read only. Note that views cannot be edited; updatable views (using rules) are not supported.
|
||||
|
||||
The editor features a toolbar that allows quick access to frequently used options, and a work environment divided into two panels:
|
||||
The editor features a toolbar that allows quick access to frequently used options, and a work environment divided into two panels:
|
||||
|
||||
* The upper panel displays the SQL command that was used to select the content displayed in the lower panel.
|
||||
* The upper panel displays the SQL command that was used to select the content displayed in the lower panel.
|
||||
* The lower panel (the Data Grid) displays the data selected from the table or view.
|
||||
|
||||
**The View/Edit Data Toolbar**
|
||||
|
||||
The toolbar includes context-sensitive icons that provide shortcuts to frequently performed tasks.
|
||||
The toolbar includes context-sensitive icons that provide shortcuts to frequently performed tasks.
|
||||
|
||||
.. image:: images/editgrid_toolbar.png
|
||||
.. image:: images/editgrid_toolbar.png
|
||||
:alt: Edit grid toolbar
|
||||
|
||||
Hover over an icon to display a tooltip that describes the icon's functionality.
|
||||
|
||||
@@ -38,7 +40,7 @@ Hover over an icon to display a tooltip that describes the icon's functionality.
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Delete Row* | Use the *Delete Row* icon to add a new row in the output panel. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Filter* | Click the *Filter* icon to open a dialog that allows you to write and apply a filter for the | |
|
||||
| *Filter* | Click the *Filter* icon to open a dialog that allows you to write and apply a filter for the | |
|
||||
| | content currently displayed in the output panel. Click the down arrow to open the *Filter* drop- | |
|
||||
| | down menu and select from pre-defined options: | |
|
||||
| | | |
|
||||
@@ -74,12 +76,12 @@ Hover over an icon to display a tooltip that describes the icon's functionality.
|
||||
|
||||
**The Data Grid**
|
||||
|
||||
The top row of the data grid displays the name of each column, the data type, and if applicable, the number of characters allowed. A column that is part of the primary key will additionally be marked with [PK].
|
||||
The top row of the data grid displays the name of each column, the data type, and if applicable, the number of characters allowed. A column that is part of the primary key will additionally be marked with [PK].
|
||||
|
||||
To modify the displayed data:
|
||||
|
||||
* To change a numeric value within the grid, double-click the value to select the field. Modify the content in the square in which it is displayed.
|
||||
* To change a non-numeric value within the grid, double-click the content to access the edit bubble. After modifying the contentof the edit bubble, click the *Save* button to display your changes in the data grid, or *Cancel* to exit the edit bubble without saving.
|
||||
* To change a numeric value within the grid, double-click the value to select the field. Modify the content in the square in which it is displayed.
|
||||
* To change a non-numeric value within the grid, double-click the content to access the edit bubble. After modifying the contentof the edit bubble, click the *Save* button to display your changes in the data grid, or *Cancel* to exit the edit bubble without saving.
|
||||
|
||||
To enter a newline character, click Ctrl-Enter or Shift-Enter. Newline formatting is only displayed when the field content is accessed via an edit bubble.
|
||||
|
||||
@@ -87,12 +89,35 @@ To add a new row to the table, enter data into the last (unnumbered) row of the
|
||||
|
||||
To write a SQL NULL to the table, simply leave the field empty. When you store the new row, the will server fill in the default value for that column. If you store a change to an existing row, the value NULL will explicitly be written.
|
||||
|
||||
To write an empty string to the table, enter the special string '' (two single quotes) in the field. If you want to write a string containing solely two single quotes to the table, you need to escape these quotes, by typing \'\'
|
||||
To write an empty string to the table, enter the special string '' (two single quotes) in the field. If you want to write a string containing solely two single quotes to the table, you need to escape these quotes, by typing \'\'
|
||||
|
||||
To delete a row, press the *Delete* toolbar button. A popup will open, asking you to confirm the deletion.
|
||||
|
||||
To commit the changes to the server, select the *Save* toolbar button. Modifications to a row are written to the server automatically when you select a different row.
|
||||
|
||||
**Sort/Filter options dialog**
|
||||
|
||||
You can access *Sort/Filter options dialog* by clicking on Sort/Filter button. This allows you to specify an SQL Filter to limit the data displayed and data sorting options in the edit grid window:
|
||||
|
||||
.. image:: images/editgrid_filter_dialog.png
|
||||
:alt: Edit grid filter dialog window
|
||||
|
||||
* Use *SQL Filter* to provide SQL filtering criteria. These will be added to the "WHERE" clause of the query used to retrieve the data. For example, you might enter:
|
||||
|
||||
.. code-block:: sql
|
||||
|
||||
id > 25 AND created > '2018-01-01'
|
||||
|
||||
* Use *Data Sorting* to sort the data in the output grid
|
||||
|
||||
To add new column(s) in data sorting grid, click on the [+] icon.
|
||||
|
||||
* Use the drop-down *Column* to select the column you want to sort.
|
||||
* Use the drop-down *Order* to select the sort order for the column.
|
||||
|
||||
To delete a row from the grid, click the trash icon.
|
||||
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Ok* button to save work.
|
||||
* Click the *Close* button to discard current changes and close the dialog.
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
.. _event_trigger_dialog:
|
||||
|
||||
************************
|
||||
The Event Trigger Dialog
|
||||
************************
|
||||
|
||||
Use the *Domain Trigger* dialog to define an event trigger. Unlike regular triggers, which are attached to a single table and capture only DML events, event triggers are global to a particular database and are capable of capturing DDL events. Like regular triggers, event triggers can be written in any procedural language that includes event trigger support, or in C, but not in SQL.
|
||||
*****************************
|
||||
`Event Trigger Dialog`:index:
|
||||
*****************************
|
||||
|
||||
The *Domain Trigger* dialog organizes the development of a event trigger through the following dialog tabs: *General*, *Definition*, and *Security Labels*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
Use the *Domain Trigger* dialog to define an event trigger. Unlike regular triggers, which are attached to a single table and capture only DML events, event triggers are global to a particular database and are capable of capturing DDL events. Like regular triggers, event triggers can be written in any procedural language that includes event trigger support, or in C, but not in SQL.
|
||||
|
||||
The *Domain Trigger* dialog organizes the development of a event trigger through the following dialog tabs: *General*, *Definition*, and *Security Labels*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/event_trigger_general.png
|
||||
:alt: Event trigger dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the event trigger:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the event trigger. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Use the drop-down listbox next to *Owner* to specify the owner of the event trigger.
|
||||
* Use the drop-down listbox next to *Owner* to specify the owner of the event trigger.
|
||||
* Store notes about the event trigger in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/event_trigger_definition.png
|
||||
:alt: Event trigger dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the event trigger:
|
||||
|
||||
@@ -27,29 +29,31 @@ Use the fields in the *Definition* tab to define the event trigger:
|
||||
* Select a radio button in the *Events* field to specify when the event trigger will fire: *DDL COMMAND START*, *DDL COMMAND END*, or *SQL DROP*.
|
||||
* Use the *When* field to write a condition for the event trigger that must be satisfied before the event trigger can execute.
|
||||
|
||||
Click the *Security Labels* tab to continue.
|
||||
Click the *Security Labels* tab to continue.
|
||||
|
||||
.. image:: images/event_trigger_security.png
|
||||
:alt: Event trigger dialog security tab
|
||||
|
||||
Use the *Security* tab to define security labels applied to the trigger. Click the *Add* icon (+) to add each security label.
|
||||
Use the *Security* tab to define security labels applied to the trigger. Click the *Add* icon (+) to add each security label.
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Domain Trigger* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Domain Trigger* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Domain Trigger* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Domain Trigger* dialog:
|
||||
|
||||
.. image:: images/event_trigger_sql.png
|
||||
:alt: Event trigger dialog sql tab
|
||||
|
||||
The command creates an event trigger named *accounts* that invokes the procedure named *acct_due*.
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _exclusion_constraint_dialog:
|
||||
|
||||
*******************************
|
||||
The Exclusion constraint Dialog
|
||||
*******************************
|
||||
************************************
|
||||
`Exclusion constraint Dialog`:index:
|
||||
************************************
|
||||
|
||||
Use the *Exclusion constraint* dialog to define or modify the behavior of an exclusion constraint. An exclusion constraint guarantees that if any two rows are compared on the specified column or expression (using the specified operator), at least one of the operator comparisons will return false or null.
|
||||
|
||||
The *Exclusion constraint* dialog organizes the development of an exclusion constraint through the following dialog tabs: *General*, *Definition*, and *Columns*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
The *Exclusion constraint* dialog organizes the development of an exclusion constraint through the following dialog tabs: *General*, *Definition*, and *Columns*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/exclusion_constraint_general.png
|
||||
:alt: Exclusion constraint dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the exclusion constraint:
|
||||
|
||||
@@ -17,17 +18,18 @@ Use the fields in the *General* tab to identify the exclusion constraint:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/exclusion_constraint_definition.png
|
||||
:alt: Exclusion constraint dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the exclusion constraint:
|
||||
|
||||
* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index associated with the exclude constraint will reside.
|
||||
* Use the drop-down listbox next to *Access method* to specify the type of index that will be used when implementing the exclusion constraint:
|
||||
* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index associated with the exclude constraint will reside.
|
||||
* Use the drop-down listbox next to *Access method* to specify the type of index that will be used when implementing the exclusion constraint:
|
||||
|
||||
* Select *gist* to specify a GiST index.
|
||||
* Select *spgist* to specify a space-partitioned GiST index.
|
||||
* Select *btree* to specify a B-tree index.
|
||||
* Select *hash* to specify a hash index.
|
||||
|
||||
* Select *gist* to specify a GiST index.
|
||||
* Select *spgist* to specify a space-partitioned GiST index.
|
||||
* Select *btree* to specify a B-tree index.
|
||||
* Select *hash* to specify a hash index.
|
||||
|
||||
* Use the *Fill Factor* field to specify a fill factor for the table and associated index. The fill factor is a percentage between 10 and 100. 100 (complete packing) is the default.
|
||||
* Move the *Deferrable?* switch to the *Yes* position to specify that the timing of the constraint is deferrable, and can be postponed until the end of the statement. The default is *No*.
|
||||
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*.
|
||||
@@ -36,8 +38,9 @@ Use the fields in the *Definition* tab to define the exclusion constraint:
|
||||
Click the *Columns* tab to continue.
|
||||
|
||||
.. image:: images/exclusion_constraint_columns.png
|
||||
:alt: Exclusion constraint dialog columns tab
|
||||
|
||||
Use the fields in the *Columns* tab to to specify the column(s) to which the constraint applies. Use the drop-down listbox next to *Column* to select a column and click the *Add* icon (+) to provide details of the action on the column:
|
||||
Use the fields in the *Columns* tab to to specify the column(s) to which the constraint applies. Use the drop-down listbox next to *Column* to select a column and click the *Add* icon (+) to provide details of the action on the column:
|
||||
|
||||
* The *Column* field is populated with the selection made in the *Column* drop-down listbox.
|
||||
* If applicable, use the drop-down listbox in the *Operator class* to specify the operator class that will be used by the index for the column.
|
||||
@@ -47,13 +50,14 @@ Use the fields in the *Columns* tab to to specify the column(s) to which the con
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Exclusion Constraint* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Exclusion Constraint* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Exclusion Constraint* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Exclusion Constraint* dialog:
|
||||
|
||||
.. image:: images/exclusion_constraint_sql.png
|
||||
:alt: Exclusion constraint dialog sql tab
|
||||
|
||||
The example shown demonstrates creating an exclusion constraint named *exclude_department* that restricts additions to the dept table to those additions that are not equal to the value of the *deptno* column. The constraint uses a btree index.
|
||||
|
||||
|
||||
@@ -1,41 +1,44 @@
|
||||
.. _extension_dialog:
|
||||
|
||||
********************
|
||||
The Extension Dialog
|
||||
********************
|
||||
*************************
|
||||
`Extension Dialog`:index:
|
||||
*************************
|
||||
|
||||
Use the *Extension* dialog to install a new extension into the current database. An extension is a collection of SQL objects that add targeted functionality to your Postgres installation. The *Extension* dialog adds the functionality of an extension to the current database only; you must register the extension in each database that use the extension. Before you load an extension into a database, you should confirm that any pre-requisite files are installed.
|
||||
|
||||
The *Extension* dialog allows you to implement options of the CREATE EXTENSION command through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Extension* dialog allows you to implement options of the CREATE EXTENSION command through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/extension_general.png
|
||||
:alt: Extension dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify an extension:
|
||||
|
||||
* Use the drop-down listbox in the *Name* field to select the extension. Each extension must have a unique name.
|
||||
* Store notes about the extension in the *Comment* field.
|
||||
* Store notes about the extension in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/extension_definition.png
|
||||
:alt: Extension dialog definition tab
|
||||
|
||||
Use the *Definition* tab to select the *Schema* and *Version*:
|
||||
|
||||
* Use the drop-down listbox next to *Schema* to select the name of the schema in which to install the extension's objects.
|
||||
* Use the drop-down listbox next to *Version* to select the version of the extension to install.
|
||||
* Use the drop-down listbox next to *Schema* to select the name of the schema in which to install the extension's objects.
|
||||
* Use the drop-down listbox next to *Version* to select the version of the extension to install.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Extension* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Extension* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Extension* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Extension* dialog:
|
||||
|
||||
.. image:: images/extension_sql.png
|
||||
:alt: Extension dialog sql tab
|
||||
|
||||
The command creates the *chkpass* extension in the *public* schema. It is version *1.0* of *chkpass*.
|
||||
|
||||
The command creates the *chkpass* extension in the *public* schema. It is version *1.0* of *chkpass*.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,46 +1,50 @@
|
||||
.. _foreign_data_wrapper_dialog:
|
||||
|
||||
*******************************
|
||||
The Foreign Data Wrapper Dialog
|
||||
*******************************
|
||||
************************************
|
||||
`Foreign Data Wrapper Dialog`:index:
|
||||
************************************
|
||||
|
||||
Use the *Foreign Data Wrapper* dialog to create or modify a foreign data wrapper. A foreign data wrapper is an adapter between a Postgres database and data stored on another data source.
|
||||
Use the *Foreign Data Wrapper* dialog to create or modify a foreign data wrapper. A foreign data wrapper is an adapter between a Postgres database and data stored on another data source.
|
||||
|
||||
You must be a superuser to create a foreign data wrapper.
|
||||
|
||||
The *Foreign Data Wrapper* dialog organizes the development of a foreign data wrapper through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Foreign Data Wrapper* dialog organizes the development of a foreign data wrapper through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/foreign_data_wrapper_general.png
|
||||
:alt: Foreign data wrapper dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the foreign data wrapper:
|
||||
Use the fields in the *General* tab to identify the foreign data wrapper:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the foreign data wrapper. A foreign data wrapper name must be unique within the database. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign data wrapper.
|
||||
* Use the drop-down listbox next to *Owner* to select the name of the role that will own the foreign data wrapper.
|
||||
* Store notes about the foreign data wrapper in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/foreign_data_wrapper_definition.png
|
||||
:alt: Foreign data wrapper dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to set parameters:
|
||||
|
||||
* Select the name of the handler function from the drop-down listbox in the *Handler* field. This is the name of an existing function that will be called to retrieve the execution functions for foreign tables.
|
||||
* Select the name of the handler function from the drop-down listbox in the *Handler* field. This is the name of an existing function that will be called to retrieve the execution functions for foreign tables.
|
||||
* Select the name of the validator function from the drop-down listbox in the *Validator* field. This is the name of an existing function that will be called to check the generic options given to the foreign data wrapper, as well as options for foreign servers, user mappings and foreign tables using the foreign data wrapper.
|
||||
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/foreign_data_wrapper_options.png
|
||||
:alt: Foreign data wrapper dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to specify options:
|
||||
|
||||
* Click the the *Add* icon (+) button to add an option/value pair for the foreign data wrapper. Supported option/value pairs will be specific to the selected foreign data wrapper.
|
||||
* Specify the option name in the *Option* field and provide a corresponding value in the *Value* field.
|
||||
* Specify the option name in the *Option* field and provide a corresponding value in the *Value* field.
|
||||
|
||||
Click the *Add* icon (+) to specify each additional pair; to discard an option, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/foreign_data_wrapper_security.png
|
||||
:alt: Foreign data wrapper dialog security tab
|
||||
|
||||
Use the *Security* tab to assign security privileges. Click the *Add* icon (+) to assign a set of privileges.
|
||||
|
||||
@@ -56,12 +60,13 @@ Your entries in the *Foreign Data Wrapper* dialog generate a SQL command (see an
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Data Wrapper* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Data Wrapper* dialog:
|
||||
|
||||
.. image:: images/foreign_data_wrapper_sql.png
|
||||
:alt: Foreign data wrapper dialog sql tab
|
||||
|
||||
The example creates a foreign data wrapper named *libpq_debug* that uses pre-existing validator and handler functions, *dblink_fdw_validator* and *libpg_fdw_handler*. Selections on the *Options* tab set *debug* equal to *true*. The foreign data wrapper is owned by *postgres*.
|
||||
|
||||
|
||||
* Click the *Help* button (?) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _foreign_key_dialog:
|
||||
|
||||
**********************
|
||||
The Foreign key Dialog
|
||||
**********************
|
||||
***************************
|
||||
`Foreign key Dialog`:index:
|
||||
***************************
|
||||
|
||||
Use the *Foreign key* dialog to specify the behavior of a foreign key constraint. A foreign key constraint maintains referential integrity between two tables. A foreign key constraint cannot be defined between a temporary table and a permanent table.
|
||||
|
||||
The *Foreign key* dialog organizes the development of a foreign key constraint through the following dialog tabs: *General*, *Definition*, *Columns*, and *Action*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Foreign key* dialog organizes the development of a foreign key constraint through the following dialog tabs: *General*, *Definition*, *Columns*, and *Action*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/foreign_key_general.png
|
||||
:alt: Foreign key dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the foreign key constraint:
|
||||
|
||||
@@ -18,23 +19,25 @@ Use the fields in the *General* tab to identify the foreign key constraint:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/foreign_key_definition.png
|
||||
:alt: Foreign key dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the foreign key constraint:
|
||||
|
||||
* Move the *Deferrable?* switch to the *Yes* position to specify the timing of the constraint is deferrable and can be postponed until the end of the statement. The default is *No*.
|
||||
* If enabled, move the *Deferred?* switch to the *Yes* position to specify the timing of the constraint is deferred to the end of the statement. The default is *No*.
|
||||
* Move the *Match type* switch specify the type of matching that is enforced by the constraint:
|
||||
* Move the *Match type* switch specify the type of matching that is enforced by the constraint:
|
||||
|
||||
* Select *Full* to indicate that all columns of a multicolumn foreign key must be null if any column is null; if all columns are null, the row is not required to have a match in the referenced table.
|
||||
* Select *Full* to indicate that all columns of a multicolumn foreign key must be null if any column is null; if all columns are null, the row is not required to have a match in the referenced table.
|
||||
* Select *Simple* to specify that a single foreign key column may be null; if any column is null, the row is not required to have a match in the referenced table.
|
||||
|
||||
|
||||
* Move the *Validated* switch to the *Yes* position to instruct the server to validate the existing table content (against a foreign key or check constraint) when you save modifications to this dialog.
|
||||
* Move the *Auto FK Index* switch to the *No* position to disable the automatic index feature.
|
||||
* The field next to *Covering Index* generates the name of an index if the *Auto FK Index* switch is in the *Yes* position; or, this field is disabled.
|
||||
* The field next to *Covering Index* generates the name of an index if the *Auto FK Index* switch is in the *Yes* position; or, this field is disabled.
|
||||
|
||||
Click the *Columns* tab to continue.
|
||||
|
||||
.. image:: images/foreign_key_columns.png
|
||||
:alt: Foreign key dialog columns tab
|
||||
|
||||
Use the fields in the *Columns* tab to specify one or more reference column(s). A Foreign Key constraint requires that one or more columns of a table must only contain values that match values in the referenced column(s) of a row of a referenced table:
|
||||
|
||||
@@ -47,14 +50,15 @@ Click the *Add* icon (+) to add a column to the list; repeat the steps above and
|
||||
Click the *Action* tab to continue.
|
||||
|
||||
.. image:: images/foreign_key_action.png
|
||||
:alt: Foreign key dialog action tab
|
||||
|
||||
Use the drop-down listboxes on the *Action* tab to specify behavior related to the foreign key constraint that will be performed when data within the table is updated or deleted:
|
||||
Use the drop-down listboxes on the *Action* tab to specify behavior related to the foreign key constraint that will be performed when data within the table is updated or deleted:
|
||||
|
||||
* Use the drop-down listbox next to *On update* to select an action that will be performed when data in the table is updated.
|
||||
* Use the drop-down listbox next to *On delete* to select an action that will be performed when data in the table is deleted.
|
||||
|
||||
The supported actions are:
|
||||
|
||||
|
||||
+-------------+------------------------------------------------------------------------------------------------------------+
|
||||
| NO ACTION | Produce an error indicating that the deletion or update will create a foreign key constraint violation. |
|
||||
| | If the constraint is deferred, this error will be produced at constraint check time if any referencing |
|
||||
@@ -74,16 +78,17 @@ The supported actions are:
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Foreign key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Foreign key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign key* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Foreign key* dialog:
|
||||
|
||||
.. image:: images/foreign_key_sql.png
|
||||
:alt: Foreign key dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a foreign key constraint named *territory_fkey* that matches values in the *distributors* table *territory* column with those of the *sales_territories* table *region* column.
|
||||
|
||||
The example shown demonstrates creating a foreign key constraint named *territory_fkey* that matches values in the *distributors* table *territory* column with those of the *sales_territories* table *region* column.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _foreign_server_dialog:
|
||||
|
||||
*************************
|
||||
The Foreign Server Dialog
|
||||
*************************
|
||||
******************************
|
||||
`Foreign Server Dialog`:index:
|
||||
******************************
|
||||
|
||||
Use the *Foreign Server* dialog to create a foreign server. A foreign server typically encapsulates connection information that a foreign-data wrapper uses to access an external data resource. Each foreign data wrapper may connect to a different foreign server; in the *pgAdmin* tree control, expand the node of the applicable foreign data wrapper to launch the *Foreign Server* dialog.
|
||||
|
||||
The *Foreign Server* dialog organizes the development of a foreign server through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Foreign Server* dialog organizes the development of a foreign server through the following dialog tabs: *General*, *Definition*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/foreign_server_general.png
|
||||
:alt: Foreign server dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the foreign server:
|
||||
|
||||
@@ -19,6 +20,7 @@ Use the fields in the *General* tab to identify the foreign server:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/foreign_server_definition.png
|
||||
:alt: Foreign server dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to set parameters:
|
||||
|
||||
@@ -28,23 +30,25 @@ Use the fields in the *Definition* tab to set parameters:
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/foreign_server_options.png
|
||||
:alt: Foreign server dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to specify options. Click the *Add* button to create an option clause for the foreign server.
|
||||
Use the fields in the *Options* tab to specify options. Click the *Add* button to create an option clause for the foreign server.
|
||||
|
||||
* Specify the option name in the *Option* field.
|
||||
* Provide a corresponding value in the *Value* field.
|
||||
* Provide a corresponding value in the *Value* field.
|
||||
|
||||
Click *Add* to create each additional clause; to discard an option, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/foreign_server_security.png
|
||||
:alt: Foreign server dialog security tab
|
||||
|
||||
Use the *Security* tab to assign security privileges to the foreign server. Click *Add* before you assign a set of privileges.
|
||||
|
||||
* Select the name of the role from the drop-down listbox in the *Grantee* field.
|
||||
* Click inside the *Privileges* field. Check the boxes to the left of one or more privileges to grant the selected privileges to the specified user.
|
||||
* Select the name of the role from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the foreign server. This is a required field.
|
||||
* Select the name of the role from the drop-down listbox in the *Grantor* field. The default grantor is the owner of the foreign server. This is a required field.
|
||||
|
||||
Click *Add* to assign a new set of privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* dialog.
|
||||
|
||||
@@ -54,13 +58,14 @@ Your entries in the *Foreign Server* dialog generate a SQL command (see an examp
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Server* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Server* dialog:
|
||||
|
||||
.. image:: images/foreign_server_sql.png
|
||||
.. image:: images/foreign_server_sql.png
|
||||
:alt: Foreign server dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a foreign server for the foreign data wrapper *hdfs_fdw*. It has the name *hdfs_server*; its type is *hiveserver2*. Options for the foreign server include a host and a port.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to restore configuration parameters.
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _foreign_table_dialog:
|
||||
|
||||
************************
|
||||
The Foreign Table Dialog
|
||||
************************
|
||||
*****************************
|
||||
`Foreign Table Dialog`:index:
|
||||
*****************************
|
||||
|
||||
Use the *Foreign Table* dialog to define a foreign table in the current database. Foreign tables define the structure of an external data source that resides on a foreign server.
|
||||
|
||||
The *Foreign Table* dialog organizes the development of a foreign table through the following dialog tabs: *General*, *Definition*, *Columns*, *Constraints*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Foreign Table* dialog organizes the development of a foreign table through the following dialog tabs: *General*, *Definition*, *Columns*, *Constraints*, *Options*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/foreign_table_general.png
|
||||
:alt: Foreign table dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the foreign table:
|
||||
|
||||
@@ -20,15 +21,17 @@ Use the fields in the *General* tab to identify the foreign table:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/foreign_table_definition.png
|
||||
:alt: Foreign table dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the external data source:
|
||||
|
||||
* Use the drop-down listbox next to *Foreign server* to select a foreign server. This list is populated with servers defined through the *Foreign Server* dialog.
|
||||
* Use the drop-down listbox next to *Inherits* to specify a parent table. The foreign table will inherit all of its columns. This field is optional.
|
||||
* Use the drop-down listbox next to *Inherits* to specify a parent table. The foreign table will inherit all of its columns. This field is optional.
|
||||
|
||||
Click the *Columns* tab to continue.
|
||||
|
||||
.. image:: images/foreign_table_columns.png
|
||||
:alt: Foreign table dialog columns tab
|
||||
|
||||
Use the fields in the *Columns* tab to to add columns and their attributes to the table. Click the *Add* icon (+) to define a column:
|
||||
|
||||
@@ -40,6 +43,7 @@ Click the *Add* icon (+) to specify each additional column; to discard a column,
|
||||
Click the *Constraints* tab to continue.
|
||||
|
||||
.. image:: images/foreign_table_constraints.png
|
||||
:alt: Foreign table dialog constraints tab
|
||||
|
||||
Use the fields in the *Constraints* tab to apply a table constraint to the foreign table. Click the *Add* icon (+) to define a constraint:
|
||||
|
||||
@@ -53,19 +57,21 @@ Click the *Add* icon (+) to specify each additional constraint; to discard a con
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/foreign_table_options.png
|
||||
:alt: Foreign table dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to specify options to be associated with the new foreign table or one of its columns; the accepted option names and values are specific to the foreign data wrapper associated with the foreign server. Click the *Add* icon (+) to add an option/value pair.
|
||||
Use the fields in the *Options* tab to specify options to be associated with the new foreign table or one of its columns; the accepted option names and values are specific to the foreign data wrapper associated with the foreign server. Click the *Add* icon (+) to add an option/value pair.
|
||||
|
||||
* Specify the option name in the *Option* field. Duplicate option names are not allowed.
|
||||
* Provide a corresponding value in the *Value* field.
|
||||
* Provide a corresponding value in the *Value* field.
|
||||
|
||||
Click the *Add* icon (+) to specify each additional option/value pair; to discard an option, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/foreign_table_security.png
|
||||
:alt: Foreign table dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for database objects:
|
||||
|
||||
@@ -75,26 +81,27 @@ Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
|
||||
|
||||
Click the *Add* icon (+) to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Foreign Table* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Foreign Table* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Table* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Foreign Table* dialog:
|
||||
|
||||
.. image:: images/foreign_table_sql.png
|
||||
:alt: Foreign table dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a foreign table *weblogs* with multiple columns and two options.
|
||||
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
.. _fts_configuration_dialog:
|
||||
|
||||
****************************
|
||||
The FTS Configuration dialog
|
||||
****************************
|
||||
|
||||
*********************************
|
||||
`FTS Configuration dialog`:index:
|
||||
*********************************
|
||||
|
||||
Use the *FTS Configuration* dialog to configure a full text search. A text search configuration specifies a text search parser that can divide a string into tokens, along with dictionaries that can identify searchable tokens.
|
||||
|
||||
The *FTS Configuration* dialog organizes the development of a FTS configuration through the following dialog tabs: "*General*, *Definition*, and *Tokens*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
The *FTS Configuration* dialog organizes the development of a FTS configuration through the following dialog tabs: "*General*, *Definition*, and *Tokens*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
Click the *General* tab to begin.
|
||||
|
||||
.. image:: images/fts_configuration_general.png
|
||||
:alt: FTS configuration dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a FTS configuration:
|
||||
|
||||
@@ -22,6 +23,7 @@ Use the fields in the *General* tab to identify a FTS configuration:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/fts_configuration_definition.png
|
||||
:alt: FTS configuration dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define parameters:
|
||||
|
||||
@@ -31,27 +33,29 @@ Use the fields in the *Definition* tab to define parameters:
|
||||
Click the *Tokens* tab to continue.
|
||||
|
||||
.. image:: images/fts_configuration_tokens.png
|
||||
:alt: FTS configuration dialog tokens tab
|
||||
|
||||
Use the fields in the *Tokens* tab to add a token:
|
||||
|
||||
* Use the *Tokens* field to specify the name of a token.
|
||||
* Click the *Add* icon (+) to create a token.
|
||||
* Use the *Dictionaries* field to specify a dictionary.
|
||||
* Use the *Dictionaries* field to specify a dictionary.
|
||||
|
||||
Repeat these steps to add additional tokens; to discard a token, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *FTS Configuration* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *FTS Configuration* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *FTS Configuration* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *FTS Configuration* dialog:
|
||||
|
||||
.. image:: images/fts_configuration_sql.png
|
||||
:alt: FTS configuration dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a FTS configuration named *meme_phrases*. It uses the *default* parser.
|
||||
|
||||
The example shown demonstrates creating a FTS configuration named *meme_phrases*. It uses the *default* parser.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
.. _fts_dictionary_dialog:
|
||||
|
||||
*************************
|
||||
The FTS Dictionary Dialog
|
||||
*************************
|
||||
******************************
|
||||
`FTS Dictionary Dialog`:index:
|
||||
******************************
|
||||
|
||||
Use the *FTS Dictionary* dialog to create a full text search dictionary. You can use a predefined templates or create a new dictionary with custom parameters.
|
||||
Use the *FTS Dictionary* dialog to create a full text search dictionary. You can use a predefined templates or create a new dictionary with custom parameters.
|
||||
|
||||
The *FTS Dictionary* dialog organizes the development of a FTS dictionary through the following dialog tabs: *General*, *Definition*, and *Options*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *FTS Dictionary* dialog organizes the development of a FTS dictionary through the following dialog tabs: *General*, *Definition*, and *Options*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/fts_dictionary_general.png
|
||||
|
||||
:alt: FTS dictionary dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the dictionary:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the dictionary. The name will be displayed in the *pgAdmin* tree control.
|
||||
@@ -20,7 +21,8 @@ Use the fields in the *General* tab to identify the dictionary:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/fts_dictionary_definition.png
|
||||
|
||||
:alt: FTS dictionary dialog definition tab
|
||||
|
||||
Use the field in the *Definition* tab to choose a template from the drop-down listbox:
|
||||
|
||||
*Select *ispell* to select the Ispell template. The Ispell dictionary template supports morphological dictionaries, which can normalize many different linguistic forms of a word into the same lexeme. For example, an English Ispell dictionary can match all declensions and conjugations of the search term bank, e.g., banking, banked, banks, banks', and bank's. Ispell dictionaries usually recognize a limited set of words, so they should be followed by another broader dictionary; for example, a Snowball dictionary, which recognizes everything.
|
||||
@@ -32,7 +34,8 @@ Use the field in the *Definition* tab to choose a template from the drop-down li
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/fts_dictionary_options.png
|
||||
|
||||
:alt: FTS dictionary dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to provide template-specific options. Click the *Add* icon (+) to add an option clause:
|
||||
|
||||
* Specify the name of an option in the *Option* field
|
||||
@@ -41,17 +44,18 @@ Use the fields in the *Options* tab to provide template-specific options. Click
|
||||
Click the *Add* icon (+) to specify each additional option/value pair; to discard an option, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *FTS Dictionary* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
Your entries in the *FTS Dictionary* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *FTS Dictionary* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *FTS Dictionary* dialog:
|
||||
|
||||
.. image:: images/fts_dictionary_sql.png
|
||||
:alt: FTS dictionary dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a custom dictionary named *more_stopwords* which is based on the simple template and is configured to use standard English.
|
||||
|
||||
The example shown demonstrates creating a custom dictionary named *more_stopwords* which is based on the simple template and is configured to use standard English.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _fts_parser_dialog:
|
||||
|
||||
*********************
|
||||
The FTS Parser Dialog
|
||||
*********************
|
||||
**************************
|
||||
`FTS Parser Dialog`:index:
|
||||
**************************
|
||||
|
||||
Use the *FTS Parser* dialog to create a new text search parser. A text search parser defines a method for splitting a text string into tokens and assigning types (categories) to the tokens.
|
||||
Use the *FTS Parser* dialog to create a new text search parser. A text search parser defines a method for splitting a text string into tokens and assigning types (categories) to the tokens.
|
||||
|
||||
The *FTS Parser* dialog organizes the development of a text search parser through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *FTS Parser* dialog organizes the development of a text search parser through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/fts_parser_general.png
|
||||
:alt: FTS parser dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a text search parser:
|
||||
|
||||
@@ -19,6 +20,7 @@ Use the fields in the *General* tab to identify a text search parser:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/fts_parser_definition.png
|
||||
:alt: FTS parser dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define parameters:
|
||||
|
||||
@@ -31,9 +33,10 @@ Use the fields in the *Definition* tab to define parameters:
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
.. image:: images/fts_parser_sql.png
|
||||
:alt: FTS parser dialog sql tab
|
||||
|
||||
Your entries in the *FTS Parser* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
Your entries in the *FTS Parser* dialog generate a generate a SQL command. Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _fts_template_dialog:
|
||||
|
||||
***********************
|
||||
The FTS Template Dialog
|
||||
***********************
|
||||
****************************
|
||||
`FTS Template Dialog`:index:
|
||||
****************************
|
||||
|
||||
Use the *FTS Template* dialog to create a new text search template. A text search template defines the functions that implement text search dictionaries.
|
||||
Use the *FTS Template* dialog to create a new text search template. A text search template defines the functions that implement text search dictionaries.
|
||||
|
||||
The *FTS Template* dialog organizes the development of a text search Template through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *FTS Template* dialog organizes the development of a text search Template through the following dialog tabs: *General*, and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/fts_template_general.png
|
||||
:alt: FTS template dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a template:
|
||||
|
||||
@@ -19,6 +20,7 @@ Use the fields in the *General* tab to identify a template:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/fts_template_definition.png
|
||||
:alt: FTS template dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define function parameters:
|
||||
|
||||
@@ -31,12 +33,13 @@ Your entries in the *FTS Template* dialog generate a SQL command (see an example
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *FTS Template* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *FTS Template* dialog:
|
||||
|
||||
.. image:: images/fts_template_sql.png
|
||||
:alt: FTS template dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a fts template named *ru_template* that uses the ispell dictionary.
|
||||
|
||||
The example shown demonstrates creating a fts template named *ru_template* that uses the ispell dictionary.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _function_dialog:
|
||||
|
||||
*******************
|
||||
The Function Dialog
|
||||
*******************
|
||||
************************
|
||||
`Function Dialog`:index:
|
||||
************************
|
||||
|
||||
Use the *Function* dialog to define a function. If you drop and then recreate a function, the new function is not the same entity as the old; you must drop existing rules, views, triggers, etc. that refer to the old function.
|
||||
Use the *Function* dialog to define a function. If you drop and then recreate a function, the new function is not the same entity as the old; you must drop existing rules, views, triggers, etc. that refer to the old function.
|
||||
|
||||
The *Function* dialog organizes the development of a function through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Function* dialog organizes the development of a function through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/function_general.png
|
||||
:alt: Function dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a function:
|
||||
|
||||
@@ -20,39 +21,42 @@ Use the fields in the *General* tab to identify a function:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/function_definition.png
|
||||
:alt: Function dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the function:
|
||||
|
||||
* Use the drop-down listbox next to *Return type* to select the data type returned by the function, if any.
|
||||
* Use the drop-down listbox next to *Return type* to select the data type returned by the function, if any.
|
||||
* Use the drop-down listbox next to *Language* to select the implementation language. The default is *sql*.
|
||||
* Use the *Code* field to write the code that will execute when the function is called.
|
||||
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/function_options.png
|
||||
:alt: Function dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to describe or modify the action of the function:
|
||||
|
||||
* Use the drop-down listbox next to *Volatility* to select one of the following. *VOLATILE* is the default value.
|
||||
|
||||
* *VOLATILE* indicates that the function value can change even within a single table scan, so no optimizations can be made.
|
||||
* *VOLATILE* indicates that the function value can change even within a single table scan, so no optimizations can be made.
|
||||
* *STABLE* indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values.
|
||||
* *IMMUTABLE* indicates that the function cannot modify the database and always returns the same result when given the same argument values.
|
||||
|
||||
* Move the *Returns a Set?* switch to indicate if the function returns a set that includes multiple rows. The default is *No*.
|
||||
|
||||
* Move the *Returns a Set?* switch to indicate if the function returns a set that includes multiple rows. The default is *No*.
|
||||
* Move the *Strict?* switch to indicate if the function always returns NULL whenever any of its arguments are NULL. If *Yes*, the function is not executed when there are NULL arguments; instead a NULL result is assumed automatically. The default is *No*.
|
||||
* Move the *Security of definer?* switch to specify that the function is to be executed with the privileges of the user that created it. The default is *No*.
|
||||
* Move the *Window?* switch to indicate that the function is a window function rather than a plain function. The default is *No*. This is currently only useful for functions written in C. The WINDOW attribute cannot be changed when replacing an existing function definition. For more information about the CREATE FUNCTION command, see the PostgreSQL core documentation available at:
|
||||
|
||||
http://www.postgresql.org/docs/9.5/static/functions-window.html
|
||||
|
||||
* Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the function, in units of cpu_operator_cost. If the function returns a set, this is the cost per returned row.
|
||||
* Use the *Estimated rows* field to specify a positive number giving the estimated number of rows that the query planner should expect the function to return. This is only allowed when the function is declared to return a set. The default assumption is 1000 rows.
|
||||
|
||||
* Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the function, in units of cpu_operator_cost. If the function returns a set, this is the cost per returned row.
|
||||
* Use the *Estimated rows* field to specify a positive number giving the estimated number of rows that the query planner should expect the function to return. This is only allowed when the function is declared to return a set. The default assumption is 1000 rows.
|
||||
* Move the *Leak proof?* switch to indicate whether the function has side effects. The default is *No*. This option can only be set by the superuser.
|
||||
|
||||
Click the *Arguments* tab to continue.
|
||||
|
||||
.. image:: images/function_arguments.png
|
||||
:alt: Function dialog arguments tab
|
||||
|
||||
Use the fields in the *Arguments* tab to define an argument. Click the *Add* icon (+) to set parameters and values for the argument:
|
||||
|
||||
@@ -66,19 +70,21 @@ Click the *Add* icon (+) to define another argument; to discard an argument, cli
|
||||
Click the *Parameters* tab to continue.
|
||||
|
||||
.. image:: images/function_parameters.png
|
||||
:alt: Function dialog parameters tab
|
||||
|
||||
Use the fields in the *Parameters* tab to specify settings that will be applied when the function is invoked. Click the *Add* icon (+) to add a *Name*/*Value* field in the table.
|
||||
|
||||
* Use the drop-down listbox in the *Name* column in the *Parameters* panel to select a parameter.
|
||||
* Use the drop-down listbox in the *Name* column in the *Parameters* panel to select a parameter.
|
||||
* Use the *Value* field to specify the value that will be associated with the selected variable. This field is context-sensitive.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/function_security.png
|
||||
:alt: Function dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign usage privileges for the function to a role.
|
||||
Use the *Privileges* panel to assign usage privileges for the function to a role.
|
||||
|
||||
* Select the name of the role from the drop-down listbox in the *Grantee* field.
|
||||
* Click inside the *Privileges* field. Check the boxes to the left of one or more privileges to grant the selected privilege to the specified user.
|
||||
@@ -86,25 +92,26 @@ Use the *Privileges* panel to assign usage privileges for the function to a role
|
||||
|
||||
Click the *Add* icon (+) to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Function* dialog generate a generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Function* dialog generate a generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by selections made in the *Function* dialog:
|
||||
The following is an example of the sql command generated by selections made in the *Function* dialog:
|
||||
|
||||
.. image:: images/function_sql.png
|
||||
:alt: Function dialog sql tab
|
||||
|
||||
The example demonstrates creating an *edbspl* function named *emp_comp*. The function adds two columns (p_sal and p_comm), and then uses the result to compute a yearly salary, returning a NUMERIC value.
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help.View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
.. _getting_started:
|
||||
|
||||
***************
|
||||
Getting Started
|
||||
***************
|
||||
************************
|
||||
`Getting Started`:index:
|
||||
************************
|
||||
|
||||
Pre-compiled and configured installation packages for pgAdmin 4 are available for a number of desktop environments; we recommend using an installer whenever possible. A standard installation using the pgAdmin installer is a server deployment.
|
||||
Pre-compiled and configured installation packages for pgAdmin 4 are available
|
||||
for a number of desktop environments; we recommend using an installer
|
||||
whenever possible.
|
||||
|
||||
In a Server Deployment, the pgAdmin application is deployed behind a webserver or with the WSGI interface.
|
||||
If you install pgAdmin in server mode, you will be prompted to provide a role name and pgAdmin password when you initially connect to pgAdmin. The first role registered with pgAdmin will be an administrative user; the administrative role can use the pgAdmin *User Management* dialog to create and manage additional pgAdmin user accounts. When a user authenticates with pgAdmin, the pgAdmin tree control displays the server definitions associated with that login role.
|
||||
In a Server Deployment, the pgAdmin application is deployed behind a webserver
|
||||
or with the WSGI interface.
|
||||
If you install pgAdmin in server mode, you will be prompted to provide a role
|
||||
name and pgAdmin password when you initially connect to pgAdmin. The first
|
||||
role registered with pgAdmin will be an administrative user; the
|
||||
administrative role can use the pgAdmin *User Management* dialog to create
|
||||
and manage additional pgAdmin user accounts. When a user authenticates
|
||||
with pgAdmin, the pgAdmin tree control displays the server definitions
|
||||
associated with that login role.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -18,7 +27,12 @@ Contents:
|
||||
pgadmin_user
|
||||
change_user_password
|
||||
|
||||
In a Desktop Deployment, the pgAdmin application is configured to use the desktop runtime environment to host and display the program on a supported platform. Typically, users will install a pre-built package to run pgAdmin in desktop mode, but a manual desktop deployment can be installed and though it is more difficult to setup, it may be useful for developers interested in understanding how pgAdmin works.
|
||||
In a Desktop Deployment, the pgAdmin application is configured to use the
|
||||
desktop runtime environment to host the program on a supported platform.
|
||||
Typically, users will install a pre-built package to run pgAdmin in desktop
|
||||
mode, but a manual desktop deployment can be installed and though it is more
|
||||
difficult to setup, it may be useful for developers interested in understanding
|
||||
how pgAdmin works.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -27,15 +41,32 @@ Contents:
|
||||
|
||||
desktop_deployment
|
||||
|
||||
The pgAdmin 4 client features a highly-customizable display that features drag-and-drop panels that you can arrange to make the best use of your desktop environment.
|
||||
.. note:: Pre-compiled and configured installation packages are available for
|
||||
a number of platforms. These packages should be used by end-users whereever
|
||||
possible - the following information is useful for the maintainers of those
|
||||
packages and users interested in understanding how pgAdmin works.
|
||||
|
||||
The tree control provides an elegant overview of the managed servers, and the objects that reside on each server. Right-click on a node within the tree control to access context-sensitive menus that provide quick access to management tasks for the selected object.
|
||||
The pgAdmin 4 client features a highly-customizable display that features
|
||||
drag-and-drop panels that you can arrange to make the best use of your desktop
|
||||
environment.
|
||||
|
||||
The tabbed browser provide quick access to statistical information about each object in the tree control, and pgAdmin tools and utilities (such as the Query tool and the debugger). pgAdmin opens additional feature tabs each time you access the extended functionality offered by pgAdmin tools; you can open, close, and re-arrange feature tabs as needed.
|
||||
The tree control provides an elegant overview of the managed servers, and the
|
||||
objects that reside on each server. Right-click on a node within the tree control
|
||||
to access context-sensitive menus that provide quick access to management tasks
|
||||
for the selected object.
|
||||
|
||||
Use the *Preferences* dialog to customize the content and colors of the pgAdmin display. To open the *Preferences* dialog, select *Preferences* from the *File* menu.
|
||||
The tabbed browser provide quick access to statistical information about each
|
||||
object in the tree control, and pgAdmin tools and utilities (such as the Query
|
||||
tool and the debugger). pgAdmin opens additional feature tabs each time you
|
||||
access the extended functionality offered by pgAdmin tools; you can open, close,
|
||||
and re-arrange feature tabs as needed.
|
||||
|
||||
*Help* buttons in the lower-left corner of each dialog will open the online help for the dialog. You can access additional Postgres help by navigating through the *Help* menu, and selecting the name of the resource that you wish to open.
|
||||
Use the *Preferences* dialog to customize the content and colors of the pgAdmin
|
||||
display. To open the *Preferences* dialog, select *Preferences* from the *File* menu.
|
||||
|
||||
*Help* buttons in the lower-left corner of each dialog will open the online help
|
||||
for the dialog. You can access additional Postgres help by navigating through
|
||||
the *Help* menu, and selecting the name of the resource that you wish to open.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -48,7 +79,8 @@ Contents:
|
||||
preferences
|
||||
keyboard_shortcuts
|
||||
|
||||
Before using pgAdmin to manage objects that reside on a server, you must define a connection to the server; for more information please see *Connecting to a Server*:
|
||||
Before using pgAdmin to manage objects that reside on a server, you must define a
|
||||
connection to the server; for more information please see *Connecting to a Server*:
|
||||
|
||||
Contents:
|
||||
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
.. _grant_wizard:
|
||||
|
||||
************
|
||||
Grant Wizard
|
||||
************
|
||||
*********************
|
||||
`Grant Wizard`:index:
|
||||
*********************
|
||||
|
||||
The *Grant Wizard* tool is a graphical interface that allows you to manage the privileges of one or more database objects in a point-and-click environment. A search box, dropdown lists, and checkboxes facilitate quick selections of database objects, roles and privileges.
|
||||
The *Grant Wizard* tool is a graphical interface that allows you to manage the privileges of one or more database objects in a point-and-click environment. A search box, dropdown lists, and checkboxes facilitate quick selections of database objects, roles and privileges.
|
||||
|
||||
The wizard organizes privilege management through a sequence of windows: *Object Selection (step 1 of 3)*, *Privileges Selection (step 2 of 3)* and *Final (Review Selection) (step 3 of 3)*. The *Final (Review Selection)* window displays the SQL code generated by wizard selections.
|
||||
|
||||
The wizard organizes privilege management through a sequence of windows: *Object Selection (step 1 of 3)*, *Privileges Selection (step 2 of 3)* and *Final (Review Selection) (step 3 of 3)*. The *Final (Review Selection)* window displays the SQL code generated by wizard selections.
|
||||
|
||||
To launch the *Grant Wizard* tool, select a database object in the *pgAdmin* tree control, then navigate through *Tools* on the menu bar to click on the *Grant Wizard* option.
|
||||
|
||||
.. image:: images/grant_wizard_step1.png
|
||||
:alt: Grant wizard step one page
|
||||
|
||||
Use the fields in the *Object Selection (step 1 of 3)* window to select the object or objects on which you are modifying privileges. Use the *Search by object type or name* field to locate a database object, or use the scrollbar to scroll through the list of all accessible objects.
|
||||
Use the fields in the *Object Selection (step 1 of 3)* window to select the object or objects on which you are modifying privileges. Use the *Search by object type or name* field to locate a database object, or use the scrollbar to scroll through the list of all accessible objects.
|
||||
|
||||
* Each row in the table lists object identifiers; check the checkbox in the left column to include an object as a target of the Grant Wizard. The table displays:
|
||||
* Each row in the table lists object identifiers; check the checkbox in the left column to include an object as a target of the Grant Wizard. The table displays:
|
||||
|
||||
* The object type in the *Object Type* field
|
||||
* The schema in which the object resides in the *Schema* field
|
||||
* The object name in the *Name* field.
|
||||
* The object name in the *Name* field.
|
||||
|
||||
Click the *Next* button to continue, or the *Cancel* button to close the wizard without modifying privileges.
|
||||
|
||||
.. image:: images/grant_wizard_step2.png
|
||||
:alt: Grant wizard step two page
|
||||
|
||||
Use the fields in the *Privileges Selection (step 2 of 3)* window to grant privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have the right to grant privileges on the object to others. If WITH GRANT OPTION is subsequently revoked, any role who received access to that object from that Grantee (directly or through a chain of grants) will lose thier privileges on the object.
|
||||
|
||||
@@ -40,12 +42,13 @@ Your entries in the *Grant Wizard* tool generate a SQL command; you can review t
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Grant Wizard* tool:
|
||||
The following is an example of the sql command generated by user selections in the *Grant Wizard* tool:
|
||||
|
||||
.. image:: images/grant_wizard_step3.png
|
||||
:alt: Grant wizard step three page
|
||||
|
||||
The commands displayed assign a role named *Bob* *INSERT* and *UPDATE* privileges *WITH GRANT OPTION* on the *sales_meetings* and the *sales_territories* tables.
|
||||
|
||||
* Click the *Back* button to select or deselect additional database objects, roles and privileges.
|
||||
* Click the *Back* button to select or deselect additional database objects, roles and privileges.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Finish* button to save selections and exit the wizard.
|
||||
|
After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 343 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 56 KiB |
@@ -1,14 +1,15 @@
|
||||
.. _import_export_data:
|
||||
|
||||
*****************************
|
||||
The Import/Export data Dialog
|
||||
*****************************
|
||||
**********************************
|
||||
`Import/Export data Dialog`:index:
|
||||
**********************************
|
||||
|
||||
Use the *Import/Export data* dialog to copy data from a table to a file, or copy data from a file into a table.
|
||||
|
||||
The *Import/Export data* dialog organizes the import/export of data through the *Options* and *Columns* tabs.
|
||||
The *Import/Export data* dialog organizes the import/export of data through the *Options* and *Columns* tabs.
|
||||
|
||||
.. image:: images/import_export_options.png
|
||||
:alt: Import Export data dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to specify import and export preferences:
|
||||
|
||||
@@ -17,38 +18,42 @@ Use the fields in the *Options* tab to specify import and export preferences:
|
||||
* Use the fields in the *File Info* field box to specify information about the source or target file:
|
||||
|
||||
* Enter the name of the source or target file in the *Filename* field. Optionally, select the *Browser* icon (ellipsis) to the right to navigate into a directory and select a file.
|
||||
* Use the drop-down listbox in the *Format* field to specify the file type. Select:
|
||||
|
||||
* Use the drop-down listbox in the *Format* field to specify the file type. Select:
|
||||
|
||||
* *binary* for a .bin file.
|
||||
* *csv* for a .csv file.
|
||||
* *text* for a .txt file.
|
||||
|
||||
|
||||
* Use the drop-down listbox in the *Encoding* field to specify the type of character encoding.
|
||||
|
||||
.. image:: images/import_export_miscellaneous.png
|
||||
:alt: Import Export data dialog miscellaneous tab
|
||||
|
||||
* Use the fields in the *Miscellaneous* field box to specify additional information:
|
||||
|
||||
* Move the *OID* switch to the *Yes* position to include the *OID* column. The *OID* is a system-assigned value that may not be modified. The default is *No*.
|
||||
* Move the *Header* switch to the *Yes* position to include the table header with the data rows. If you include the table header, the first row of the file will contain the column names.
|
||||
* If you are exporting data, specify the delimiter that will separate the columns within the target file in the *Delimiter* field. The separating character can be a colon, semicolon, a vertical bar, or a tab.
|
||||
* Specify a quoting character used in the *Quote* field. Quoting can be applied to string columns only (i.e. numeric columns will not be quoted) or all columns regardless of data type. The character used for quoting can be a single quote or a double quote.
|
||||
* Specify a character that should appear before a data character that matches the *QUOTE* value in the *Escape* field.
|
||||
|
||||
* If you are exporting data, specify the delimiter that will separate the columns within the target file in the *Delimiter* field. The separating character can be a colon, semicolon, a vertical bar, or a tab.
|
||||
* Specify a quoting character used in the *Quote* field. Quoting can be applied to string columns only (i.e. numeric columns will not be quoted) or all columns regardless of data type. The character used for quoting can be a single quote or a double quote.
|
||||
* Specify a character that should appear before a data character that matches the *QUOTE* value in the *Escape* field.
|
||||
|
||||
Click the *Columns* tab to continue.
|
||||
|
||||
.. image:: images/import_export_columns.png
|
||||
:alt: Import Export data dialog columns tab
|
||||
|
||||
Use the fields in the *Columns* tab to select the columns that will be imported or exported:
|
||||
|
||||
* Click inside the *Columns to export/import* field to deselect one or more columns from the drop-down listbox. To delete a selection, click the *x* to the left of the column name. Click an empty spot inside the field to access the drop-down list.
|
||||
* Use the *NULL Strings* field to specify a string that will represent a null value within the source or target file.
|
||||
* If enabled, click inside the *Not null columns* field to select one or more columns that will not be checked for a NULL value. To delete a column, click the *x* to the left of the column name.
|
||||
* Use the *NULL Strings* field to specify a string that will represent a null value within the source or target file.
|
||||
* If enabled, click inside the *Not null columns* field to select one or more columns that will not be checked for a NULL value. To delete a column, click the *x* to the left of the column name.
|
||||
|
||||
After completing the *Import/Export data* dialog, click the *OK* button to perform the import or export. pgAdmin will inform you when the background process completes:
|
||||
|
||||
.. image:: images/import_export_complete.png
|
||||
:alt: Import Export data completion notification
|
||||
|
||||
Use the *Click here for details* link on the notification to open the *Process Watcher* and review detailed information about the execution of the command that performed the import or export:
|
||||
|
||||
.. image:: images/import_export_pw.png
|
||||
.. image:: images/import_export_pw.png
|
||||
:alt: Import Export data process watcher
|
||||
@@ -6,7 +6,11 @@ pgAdmin 4
|
||||
:align: right
|
||||
:alt: pgAdmin Logo
|
||||
|
||||
Welcome to pgAdmin 4. pgAdmin is the leading Open Source management tool for Postgres, the world's most advanced Open Source database. pgAdmin 4 is designed to meet the needs of both novice and experienced Postgres users alike, providing a powerful graphical interface that simplifies the creation, maintenance and use of database objects.
|
||||
Welcome to pgAdmin 4. pgAdmin is the leading Open Source management tool for
|
||||
Postgres, the world's most advanced Open Source database. pgAdmin 4 is designed
|
||||
to meet the needs of both novice and experienced Postgres users alike, providing
|
||||
a powerful graphical interface that simplifies the creation, maintenance and use
|
||||
of database objects.
|
||||
|
||||
Contents:
|
||||
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
.. _index_dialog:
|
||||
|
||||
****************
|
||||
The Index Dialog
|
||||
****************
|
||||
|
||||
*********************
|
||||
`Index Dialog`:index:
|
||||
*********************
|
||||
|
||||
Use the *Index* dialog to create an index on a specified table or materialized view.
|
||||
|
||||
The *Index* dialog organizes the development of a index through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Index* dialog organizes the development of a index through the following dialog tabs: *General* and *Definition*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/index_general.png
|
||||
:alt: Index dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the index:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the index. The name will be displayed in the *pgAdmin* tree control.
|
||||
* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index will reside.
|
||||
* Use the drop-down listbox next to *Tablespace* to select the tablespace in which the index will reside.
|
||||
* Store notes about the index in the *Comment* field.
|
||||
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/index_definition.png
|
||||
:alt: Index dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the index:
|
||||
Use the fields in the *Definition* tab to define the index:
|
||||
|
||||
* Use the drop-down listbox next to *Access Method* to select an index type:
|
||||
|
||||
@@ -30,7 +32,7 @@ Use the fields in the *Definition* tab to define the index:
|
||||
* Select *gin* to create a GIN index. A GIN index may improve performance when managing two-dimensional geometric data types and nearest-neighbor searches.
|
||||
* Select *spgist* to create a space-partitioned GiST index. A SP-GiST index may improve performance when managing non-balanced data structures.
|
||||
* Select *brin* to create a BRIN index. A BRIN index may improve performance when managing minimum and maximum values and ranges.
|
||||
|
||||
|
||||
* Use the *Fill Factor* field to specify a fill factor for the index. The fill factor specifies how full the selected method will try to fill each index page.
|
||||
* Move the *Unique?* switch to the *Yes* position to check for duplicate values in the table when the index is created and when data is added. The default is *No*.
|
||||
* Move the *Clustered?* switch to the *Yes* position to instruct the server to cluster the table.
|
||||
@@ -45,26 +47,27 @@ Use the context-sensitive fields in the *Columns* panel to specify which column(
|
||||
|
||||
* Select *ASC* to specify an ascending sort order (the default);
|
||||
* Select *DESC* to specify a descending sort order.
|
||||
|
||||
|
||||
* If enabled, move the *Nulls* switch to specify the sort order of nulls:
|
||||
|
||||
* Select *First* to specify nulls sort before non-nulls;
|
||||
* Select *Last* to specify nulls sort after non-nulls (the default).
|
||||
|
||||
|
||||
* Use the drop-down listbox in the *Collation* field to select a collation to use for the index.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Index* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Index* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Index* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Index* dialog:
|
||||
|
||||
.. image:: images/index_sql.png
|
||||
:alt: Index dialog sql tab
|
||||
|
||||
The example shown demonstrates creating an index named *dist_codes* that indexes the values in the *code* column of the *distributors* table.
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,30 +1,60 @@
|
||||
******************
|
||||
Keyboard Shortcuts
|
||||
******************
|
||||
***************************
|
||||
`Keyboard Shortcuts`:index:
|
||||
***************************
|
||||
|
||||
Keyboard shortcuts are provided in pgAdmin to allow easy access to specific functions.
|
||||
Keyboard shortcuts are provided in pgAdmin to allow easy access to specific
|
||||
functions. Alternate shortcuts can be configured through File > Preferences if
|
||||
desired.˝
|
||||
|
||||
**Desktop Runtime**
|
||||
**Main Browser Window**
|
||||
|
||||
When running in the Desktop Runtime, the following keyboard shortcuts are available:
|
||||
When using main browser window, the following keyboard shortcuts are available:
|
||||
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Shortcut for all platforms | Function |
|
||||
+============================+=======================================================+
|
||||
| Alt+Shift+F | Open the File menu |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+O | Open the Object menu |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+L | Open the Tools menu |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+H | Open the Help menu |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+B | Focus the browser tree |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+[ | Move tabbed panel backward |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+] | Move tabbed panel forward |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+Q | Open the Query Tool in the current database |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+V | View Data in the selected table/view |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+C | Open the context menu |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+N | Create an object |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+E | Edit object properties |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+D | Delete the object |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Alt+Shift+G | Direct debugging |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
|
||||
|
||||
**Dialog tab shortcuts**
|
||||
|
||||
Use the shortcuts below to navigate the tabsets on dialogs:
|
||||
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Shortcut for all platforms | Function |
|
||||
+============================+=======================================================+
|
||||
| Control+Shift+[ | Dialog tab backward |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
| Control+Shift+] | Dialog tab forward |
|
||||
+----------------------------+-------------------------------------------------------+
|
||||
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
|
||||
+==========================+================+=======================================+
|
||||
| Alt+Shift+A | Option+Shift+A | Display the runtime's About box |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Alt+Shift+P | Option+Shift+U | Open the runtime preferences dialogue |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Alt+Shift+U | Option+Shift+U | Open an arbitrary URL |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Ctrl+Q | Cmd+Q | Quit |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Ctrl+Plus | Cmd+Plus | Zoom in |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Ctrl+Minus | Cmd+Minus | Zoom out |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
| Ctrl+0 | Cmd+0 | Reset the zoom level |
|
||||
+--------------------------+----------------+---------------------------------------+
|
||||
|
||||
**SQL Editors**
|
||||
|
||||
@@ -61,6 +91,19 @@ When using the syntax-highlighting SQL editors, the following shortcuts are avai
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Shift+Tab | Shift+Tab | Un-indent selected text |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Alt+G | Alt+G | Jump (to line:column) |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Ctrl+Space | Ctrl+Space | Auto-complete |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Ctrl+F | Cmd+F | Find |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Ctrl+G | Cmd+G | Find next |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Ctrl+Shift+G | Cmd+Shift+G | Find previous |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
| Ctrl+Shift+F | Cmd+Shift+F | Replace |
|
||||
+--------------------------+------------------+-------------------------------------+
|
||||
|
||||
|
||||
**Query Tool**
|
||||
|
||||
@@ -77,15 +120,83 @@ When using the Query Tool, the following shortcuts are available:
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| F8 | F8 | Execute query to CSV file |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Alt+G | Alt+G | Jump (to line:column) |
|
||||
| <accesskey> + o | <accesskey> + o | Open file |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Ctrl+Space | Ctrl+Space | Auto-complete |
|
||||
| <accesskey> + s | <accesskey> + s | Save file |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Ctrl+F | Cmd+F | Find |
|
||||
| <accesskey> + n | <accesskey> + n | Find option drop down |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Ctrl+G | Cmd+G | Find next |
|
||||
| <accesskey> + c | <accesskey> + c | Copy row(s) |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Ctrl+Shift+G | Cmd+Shift+G | Find previous |
|
||||
| <accesskey> + p | <accesskey> + p | Paste row(s) |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Ctrl+Shift+F | Cmd+Shift+F | Replace |
|
||||
| <accesskey> + d | <accesskey> + d | Delete row(s) |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + f | <accesskey> + f | Filter dialog |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + i | <accesskey> + i | Filter options drop down |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + r | <accesskey> + r | Row limit |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + q | <accesskey> + q | Cancel query |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + l | <accesskey> + l | Clear option drop down |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + x | <accesskey> + x | Execute option drop down |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + t | <accesskey> + t | Display connection status |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + y | <accesskey> + y | Copy SQL on history panel |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
|
||||
|
||||
**Debugger**
|
||||
|
||||
When using the Debugger, the following shortcuts are available:
|
||||
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
|
||||
+==========================+====================+===================================+
|
||||
| <accesskey> + i | <accesskey> + i | Step in |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + o | <accesskey> + o | Step over |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + c | <accesskey> + c | Continue/Restart |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + t | <accesskey> + t | Toggle breakpoint |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + x | <accesskey> + x | Clear all breakpoints |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| <accesskey> + s | <accesskey> + s | Stop |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
| Alt + Shift + q | Alt + Shift + q | Enter or Edit values in Grid |
|
||||
+--------------------------+--------------------+-----------------------------------+
|
||||
|
||||
|
||||
**Inner panel navigation**
|
||||
|
||||
When using the Query Tool and Debugger, the following shortcuts are available for inner panel navigation:
|
||||
|
||||
+--------------------------+---------------------------+------------------------------+
|
||||
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
|
||||
+==========================+===========================+==============================+
|
||||
| Alt + Shift + Right Arrow| Alt + Shift + Right Arrow | Move to next inner panel |
|
||||
+--------------------------+---------------------------+------------------------------+
|
||||
| Alt + Shift + Left Arrow | Alt + Shift + Left Arrow | Move to previous inner panel |
|
||||
+--------------------------+---------------------------+------------------------------+
|
||||
|
||||
|
||||
.. note:: <accesskey> is browser and platform dependant. The following table lists the default access keys for supported browsers.
|
||||
|
||||
|
||||
+-------------------+------------+------------+------------+
|
||||
| | Windows | Linux | Mac |
|
||||
+===================+============+============+============+
|
||||
| Internet Explorer | Alt | Alt | |
|
||||
+-------------------+------------+------------+------------+
|
||||
| Chrome | Alt | Alt | Ctrl+Alt |
|
||||
+-------------------+------------+------------+------------+
|
||||
| Firefox | Alt+Shift | Alt+Shift | Ctrl+Alt |
|
||||
+-------------------+------------+------------+------------+
|
||||
| Safari | Alt | | Ctrl+Alt |
|
||||
+-------------------+------------+------------+------------+
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _language:
|
||||
|
||||
*******************
|
||||
The Language Dialog
|
||||
*******************
|
||||
************************
|
||||
`Language Dialog`:index:
|
||||
************************
|
||||
|
||||
Use the CREATE LANGUAGE dialog to register a new procedural language.
|
||||
Use the CREATE LANGUAGE dialog to register a new procedural language.
|
||||
|
||||
The *Language* dialog organizes the registration of a procedural language through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
The *Language* dialog organizes the registration of a procedural language through the following dialog tabs: *General*, *Definition*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/language_general.png
|
||||
:alt: Language dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a language:
|
||||
|
||||
@@ -19,6 +20,7 @@ Use the fields in the *General* tab to identify a language:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/language_definition.png
|
||||
:alt: Language dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define parameters:
|
||||
|
||||
@@ -30,8 +32,9 @@ Use the fields in the *Definition* tab to define parameters:
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/language_security.png
|
||||
:alt: Language dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for database objects:
|
||||
|
||||
@@ -41,26 +44,27 @@ Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
|
||||
|
||||
Click the *Add* icon (+) to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the function. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Language* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Language* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Language* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Language* dialog:
|
||||
|
||||
.. image:: images/language_sql.png
|
||||
:alt: Language dialog sql tab
|
||||
|
||||
"The example shown demonstrates creating the procedural language named *plperl*."
|
||||
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _licence:
|
||||
|
||||
*******
|
||||
Licence
|
||||
*******
|
||||
****************
|
||||
`Licence`:index:
|
||||
****************
|
||||
|
||||
pgAdmin is released under the `PostgreSQL Licence <http://www.postgresql.org/about/licence>`_, which is a liberal Open Source licence similar to BSD or MIT, and approved by the Open Source Initiative. The copyright for the project source code, website and documentation is attributed to the `pgAdmin Development Team <https://www.pgadmin.org/development/team.php>`_.
|
||||
@@ -1,12 +1,13 @@
|
||||
.. _maintenance_dialog:
|
||||
|
||||
**********************
|
||||
The Maintenance Dialog
|
||||
**********************
|
||||
***************************
|
||||
`Maintenance Dialog`:index:
|
||||
***************************
|
||||
|
||||
Use the *Maintenance* dialog to VACUUM, ANALYZE, REINDEX or CLUSTER a database or selected database objects.
|
||||
|
||||
.. image:: images/maintenance.png
|
||||
:alt: Maintenance dialog
|
||||
|
||||
While this utility is useful for ad-hoc maintenance purposes, you are encouraged to perform automatic VACUUM jobs on a regular schedule.
|
||||
|
||||
@@ -15,9 +16,9 @@ Select a button next to *Maintenance operation* to specify the type of maintenan
|
||||
* Click *VACUUM* to scan the selected database or table to reclaim storage used by dead tuples.
|
||||
|
||||
* Move the *FULL* switch to the *Yes* position to compact tables by writing a completely new version of the table file without dead space. The default is *No*.
|
||||
|
||||
|
||||
* Move the *FREEZE* switch to the *Yes* position to freeze data in a table when it will have no further updates. The default is *No*.
|
||||
|
||||
|
||||
* Move the *ANALYZE* switch to the *Yes* position to issue ANALYZE commands whenever the content of a table has changed sufficiently. The default is *No*.
|
||||
|
||||
* Click *ANALYZE* to update the stored statistics used by the query planner. This enables the query optimizer to select the fastest query plan for optimal performance.
|
||||
@@ -31,7 +32,9 @@ When you've completed the dialog, click *OK* to start the background process; to
|
||||
pgAdmin will inform you when the background process completes:
|
||||
|
||||
.. image:: images/maintenance_complete.png
|
||||
:alt: Maintenance completion notification
|
||||
|
||||
Use the *Click here for details* link on the notification to open the *Process Watcher* and review detailed information about the execution of the command that performed the import or export:
|
||||
|
||||
.. image:: images/maintenance_pw.png
|
||||
.. image:: images/maintenance_pw.png
|
||||
:alt: Maintenance process watcher
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _management_basics:
|
||||
|
||||
*****************
|
||||
Management Basics
|
||||
*****************
|
||||
**************************
|
||||
`Management Basics`:index:
|
||||
**************************
|
||||
|
||||
pgAdmin provides point and click dialogs that help you perform server management functions. Dialogs simplify tasks such as managing named restore points, granting user privileges, and performing VACUUM, ANALYZE and REINDEX functions.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _managing_cluster_objects:
|
||||
|
||||
******************************
|
||||
Managing Cluster Level Objects
|
||||
******************************
|
||||
***************************************
|
||||
`Managing Cluster Level Objects`:index:
|
||||
***************************************
|
||||
|
||||
Some object definitions reside at the cluster level; pgAdmin 4 provides dialogs that allow you to create these objects, manage them, and control their relationships to each other. To access a dialog that allows you to create a database object, right-click on the object type in the pgAdmin tree control, and select the *Create* option for that object. For example, to create a new database, right-click on the *Databases* node, and select *Create Database...*
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _managing_database_objects:
|
||||
|
||||
*************************
|
||||
Managing Database Objects
|
||||
*************************
|
||||
**********************************
|
||||
`Managing Database Objects`:index:
|
||||
**********************************
|
||||
|
||||
pgAdmin 4 provides simple but powerful dialogs that you can use to design and create database objects. Each dialog contains a series of tabs that you use to describe the object that will be created by the dialog; the SQL tab displays the SQL command that the server will execute when creating the object.
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _materialized_view_dialog:
|
||||
|
||||
****************************
|
||||
The Materialized View Dialog
|
||||
****************************
|
||||
*********************************
|
||||
`Materialized View Dialog`:index:
|
||||
*********************************
|
||||
|
||||
Use the *Materialized View* dialog to define a materialized view. A materialized view is a stored or cached view that contains the result set of a query. Use the REFRESH MATERIALIZED VIEW command to update the content of a materialized view.
|
||||
|
||||
The *Materialized View* dialog organizes the development of a materialized_view through the following dialog tabs: *General*, *Definition*, *Storage*, *Parameter*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Materialized View* dialog organizes the development of a materialized_view through the following dialog tabs: *General*, *Definition*, *Storage*, *Parameter*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/materialized_view_general.png
|
||||
:alt: Materialized view dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the materialized view:
|
||||
|
||||
@@ -20,22 +21,25 @@ Use the fields in the *General* tab to identify the materialized view:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/materialized_view_definition.png
|
||||
:alt: Materialized view dialog definition tab
|
||||
|
||||
Use the text editor field in the *Definition* tab to provide the query that will populate the materialized view.
|
||||
|
||||
Click the *Storage* tab to continue.
|
||||
|
||||
.. image:: images/materialized_view_storage.png
|
||||
:alt: Materialized view dialog storage tab
|
||||
|
||||
Use the fields in the *Storage* tab to maintain the materialized view:
|
||||
|
||||
* Move the *With Data* switch to the *Yes* position to specify the materialized view should be populated at creation time. If not, the materialized view cannot be queried until you invoke REFRESH MATERIALIZED VIEW.
|
||||
* Use the drop-down listbox next to *Tablespace* to select a location for the materialized view.
|
||||
* Use the *Fill Factor* field to specify a fill factor for the materialized view. The fill factor for a table is a percentage between 10 and 100. 100 (complete packing) is the default.
|
||||
* Use the *Fill Factor* field to specify a fill factor for the materialized view. The fill factor for a table is a percentage between 10 and 100. 100 (complete packing) is the default.
|
||||
|
||||
Click the *Parameter* tab to continue.
|
||||
|
||||
.. image:: images/materialized_view_parameter.png
|
||||
:alt: Materialized view dialog parameter tab
|
||||
|
||||
Use the tabs nested inside the *Parameter* tab to specify VACUUM and ANALYZE thresholds; use the *Table* tab and the *Toast Table* tab to customize values for the table and the associated toast table. To change the default values:
|
||||
|
||||
@@ -45,8 +49,9 @@ Use the tabs nested inside the *Parameter* tab to specify VACUUM and ANALYZE thr
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/materialized_view_security.png
|
||||
:alt: Materialized view dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon (+) to set privileges for the materialized view:
|
||||
|
||||
@@ -56,25 +61,26 @@ Use the *Privileges* panel to assign privileges to a role. Click the *Add* icon
|
||||
|
||||
Click the *Add* icon (+) to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the materialized view. Click the *Add* icon (+) to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the materialized view. Click the *Add* icon (+) to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click the *Add* icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Materialized View* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Materialized View* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Materialized View* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Materialized View* dialog:
|
||||
|
||||
.. image:: images/materialized_view_sql.png
|
||||
:alt: Materialized view dialog sql tab
|
||||
|
||||
The example shown creates a query named *new_hires* that stores the result of the displayed query in the *pg_default* tablespace.
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _modifying_tables:
|
||||
|
||||
*****************************
|
||||
Creating or Modifying a Table
|
||||
*****************************
|
||||
**************************************
|
||||
`Creating or Modifying a Table`:index:
|
||||
**************************************
|
||||
|
||||
pgAdmin 4 provides dialogs that allow you to modify all table properties and attributes.
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _move_objects:
|
||||
|
||||
***********************
|
||||
The Move Objects Dialog
|
||||
***********************
|
||||
****************************
|
||||
`Move Objects Dialog`:index:
|
||||
****************************
|
||||
|
||||
Use the *Move Objects* dialog to to move database objects from one tablespace to another tablespace.
|
||||
Use the *Move Objects* dialog to to move database objects from one tablespace to another tablespace.
|
||||
|
||||
The *Move Objects* dialog organizes the movement of database objects with the *General* tab; the *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Move Objects* dialog organizes the movement of database objects with the *General* tab; the *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/move_objects_general.png
|
||||
:alt: Move objects dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the items that will be moved and the tablespace to which they will be moved:
|
||||
|
||||
@@ -19,22 +20,23 @@ Use the fields in the *General* tab to identify the items that will be moved and
|
||||
* Select *Tables* to move tables from the current tablespace to the new tablespace.
|
||||
* Select *Indexes* to move indexes from the current tablespace to the new tablespace.
|
||||
* Select *Materialized views* to move materialized views from the current tablespace to the new tablespace.
|
||||
|
||||
|
||||
* Use the *Object owner* drop-down listbox to select the role that owns the objects selected in the *Object type* field. This field is optional.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Move Objects* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit the *General* tab to modify the SQL command.
|
||||
Your entries in the *Move Objects* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit the *General* tab to modify the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Move Objects* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Move Objects* dialog:
|
||||
|
||||
.. image:: images/move_objects_sql.png
|
||||
:alt: Move Objects dialog sql tab
|
||||
|
||||
The example shown demonstrates moving materialized views owned by Alice from tablespace *tbspace_01* to *tbspace_02*.
|
||||
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *OK* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _package_dialog:
|
||||
|
||||
******************
|
||||
The Package Dialog
|
||||
******************
|
||||
***********************
|
||||
`Package Dialog`:index:
|
||||
***********************
|
||||
|
||||
Use the *Package* dialog to create a (user-defined) package specification.
|
||||
Use the *Package* dialog to create a (user-defined) package specification.
|
||||
|
||||
The *Package* dialog organizes the management of a package through the following dialog tabs: *General*, *Code*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
The *Package* dialog organizes the management of a package through the following dialog tabs: *General*, *Code*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/package_general.png
|
||||
:alt: Package dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the package:
|
||||
|
||||
@@ -19,6 +20,7 @@ Use the fields in the *General* tab to identify the package:
|
||||
Click the *Code* tab to continue.
|
||||
|
||||
.. image:: images/package_code.png
|
||||
:alt: Package dialog code tab
|
||||
|
||||
Use the fields in the *Code* tab to specify the package contents and to provide implementation details:
|
||||
|
||||
@@ -28,6 +30,7 @@ Use the fields in the *Code* tab to specify the package contents and to provide
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/package_security.png
|
||||
:alt: Package dialog security tab
|
||||
|
||||
Use the fields in the *Security* tab to to assign EXECUTE privileges for the package to a role. Click the *Add* icon (+) to set privileges for the package:
|
||||
|
||||
@@ -39,12 +42,13 @@ Click the *Add* icon (+) to assign additional privileges; to discard a privilege
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Package* dialog generate a SQL command that creates or modifies a package definition:
|
||||
Your entries in the *Package* dialog generate a SQL command that creates or modifies a package definition:
|
||||
|
||||
.. image:: images/package_sql.png
|
||||
:alt: Package dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a package named *empinfo* that includes one function and one procedure.
|
||||
|
||||
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to delete any changes to the dialog.
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
.. _pgadmin_login:
|
||||
|
||||
************************
|
||||
The pgAdmin Login Dialog
|
||||
************************
|
||||
|
||||
*****************************
|
||||
`pgAdmin Login Dialog`:index:
|
||||
*****************************
|
||||
|
||||
Use the *pgAdmin Login* dialog to log in to pgAdmin:
|
||||
|
||||
.. image:: images/pgadmin_login.png
|
||||
:alt: pgAdmin login dialog
|
||||
|
||||
Use the fields in the *pgAdmin Login* dialog to authenticate your connection:
|
||||
|
||||
@@ -19,9 +20,10 @@ Use the fields in the *pgAdmin Login* dialog to authenticate your connection:
|
||||
If you cannot supply your password, click the *Forgotten your password?* button to launch a password recovery utility.
|
||||
|
||||
.. image:: images/pgadmin_login_recover.png
|
||||
:alt: pgAdmin recover login password
|
||||
|
||||
#. Provide the email address associated with your account in the *Email Address* field.
|
||||
#. Click the *Recover Password* button to initiate recovery. An email, with directions on how to reset a password, will be sent to the address entered in the *Email Address* field.
|
||||
#. Click the *Recover Password* button to initiate recovery. An email, with directions on how to reset a password, will be sent to the address entered in the *Email Address* field.
|
||||
|
||||
If you have forgotten the email associated with your account, please contact your administrator.
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
.. _pgadmin_menu_bar:
|
||||
|
||||
********************
|
||||
The pgAdmin Menu Bar
|
||||
********************
|
||||
*************************
|
||||
`pgAdmin Menu Bar`:index:
|
||||
*************************
|
||||
|
||||
The pgAdmin menu bar provides drop-down menus for access to options, commands, and utilities. The menu bar displays the following selections: *File*, *Object*, Tools*, and *Help*. Selections may be grayed out which indicates they are disabled for the object currently selected in the *pgAdmin* tree control.
|
||||
|
||||
**The File Menu**
|
||||
|
||||
.. image:: /images/file_menu.png
|
||||
:alt: pgAdmin file menu bar
|
||||
|
||||
Use the *File* menu to access the following options:
|
||||
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------+
|
||||
| Option | Action |
|
||||
+======================+=========================================================================================================+
|
||||
| *Change Password...* | Click to open the :ref:`Change Password... <change_password_dialog>` dialog to change your password. |
|
||||
| *Change Password...* | Click to open the :ref:`Change Password... <change_password_dialog>` dialog to change your password. |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------+
|
||||
| *Preferences* | Click to open the :ref:`Preferences <preferences>` dialog to to customize your pgAdmin settings. |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------------+
|
||||
@@ -25,6 +26,7 @@ Use the *File* menu to access the following options:
|
||||
**The Object Menu**
|
||||
|
||||
.. image:: /images/object_menu.png
|
||||
:alt: pgAdmin object menu bar
|
||||
|
||||
The *Object* menu is context-sensitive. Use the *Object* menu to access the following options (in alphabetical order):
|
||||
|
||||
@@ -34,15 +36,15 @@ The *Object* menu is context-sensitive. Use the *Object* menu to access the foll
|
||||
| *Connect Server...* | Click to open the :ref:`Connect to Server <connect_to_server>` dialog to establish a connection with a server. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Create* | Click *Create* to access a context menu that provides context-sensitive selections. |
|
||||
| | Your selection opens a *Create* dialog for creating a new object. |
|
||||
| | Your selection opens a *Create* dialog for creating a new object. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Delete/Drop* | Click to delete the currently selected object from the server. |
|
||||
| *Delete/Drop* | Click to delete the currently selected object from the server. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Disconnect Server...* | Click to refresh the currently selected object. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Drop Cascade* | Click to delete the currently selected object and all dependent objects from the server. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Properties...* | Click to review or modify the currently selected object's properties. |
|
||||
| *Properties...* | Click to review or modify the currently selected object's properties. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Refresh...* | Click to refresh the currently selected object. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -51,16 +53,17 @@ The *Object* menu is context-sensitive. Use the *Object* menu to access the foll
|
||||
| *Trigger(s)* | Click to *Disable* or *Enable* trigger(s) for the currently selected table. Options are displayed on the flyout menu. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Truncate* | Click to remove all rows from a table (*Truncate*) or to remove all rows from a table and its child tables |
|
||||
| | (*Truncate Cascade*). Options are displayed on the flyout menu. |
|
||||
| | (*Truncate Cascade*). Options are displayed on the flyout menu. |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
| *View Data* | Click to access a context menu that provides several options for viewing data (see below). |
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
**The Tools Menu**
|
||||
|
||||
.. image:: /images/tool_menu.png
|
||||
:alt: pgAdmin tools menu bar
|
||||
|
||||
Use the *Tools* menu to access the following options (in alphabetical order):
|
||||
Use the *Tools* menu to access the following options (in alphabetical order):
|
||||
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Option | Action |
|
||||
@@ -75,25 +78,26 @@ Use the *Tools* menu to access the following options (in alphabetical order):
|
||||
| *Backup Server...* | Click to open the :ref:`Backup Server... <backup_server_dialog>` dialog to backup a server. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Grant Wizard...* | Click to access the :ref:`Grant Wizard <grant_wizard>` tool. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Import/Export...* | Click to open the :ref:`Import/Export data... <import_export_data>` dialog to import or export data from a table. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Maintenance...* | Click to open the :ref:`Maintenance... <maintenance_dialog>` dialog to VACUUM, ANALYZE, REINDEX, or CLUSTER. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Pause replay of WAL* | Click to pause the replay of the WAL log. |
|
||||
| *Pause replay of WAL* | Click to pause the replay of the WAL log. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Query tool* | Click to open the :ref:`Query tool <query_tool>` for the currently selected object. |
|
||||
| *Query tool* | Click to open the :ref:`Query tool <query_tool>` for the currently selected object. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Reload Configuration...* | Click to update configuration files without restarting the server. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Restore...* | Click to access the :ref:`Restore <restore_dialog>` dialog to restore database files from a backup. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Resume replay of WAL* | Click to resume the replay of the WAL log. |
|
||||
| *Resume replay of WAL* | Click to resume the replay of the WAL log. |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
**The Help Menu**
|
||||
|
||||
.. image:: images/help_menu.png
|
||||
:alt: pgAdmin help menu bar
|
||||
|
||||
Use the options on the *Help* menu to access online help documents, or to review information about the pgAdmin installation (in alphabetical order):
|
||||
|
||||
@@ -102,12 +106,12 @@ Use the options on the *Help* menu to access online help documents, or to review
|
||||
+======================+=========================================================================================================================================+
|
||||
| *About pgAdmin 4* | Click to open a window where you will find information about pgAdmin; this includes the current version and the current user. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Online Help* | Click to open documentation support for using pgAdmin utilities, tools and dialogs. |
|
||||
| | Navigate (in the newly opened tab?) help documents in the left browser pane or use the search bar to specify a topic. |
|
||||
| *Online Help* | Click to open documentation support for using pgAdmin utilities, tools and dialogs. |
|
||||
| | Navigate (in the newly opened tab?) help documents in the left browser pane or use the search bar to specify a topic. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *pgAdmin Website* | Click to open the *pgAdmin.org* website in a browser window. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| *PostgreSQL Website* | Click to access the PostgreSQL core documentation hosted at the PostgreSQL site. The site also offers guides, tutorials, and resources. |
|
||||
| *PostgreSQL Website* | Click to access the PostgreSQL core documentation hosted at the PostgreSQL site. The site also offers guides, tutorials, and resources. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
.. _pgadmin_tabbed_browser:
|
||||
|
||||
**************************
|
||||
The pgAdmin Tabbed Browser
|
||||
**************************
|
||||
*******************************
|
||||
`pgAdmin Tabbed Browser`:index:
|
||||
*******************************
|
||||
|
||||
The right pane of the *pgAdmin* window features a collection of tabs that display information about the object currently selected in the *pgAdmin* tree control in the left window. Select a tab to access information about the highlighted object in the tree control.
|
||||
The right pane of the *pgAdmin* window features a collection of tabs that display information about the object currently selected in the *pgAdmin* tree control in the left window. Select a tab to access information about the highlighted object in the tree control.
|
||||
|
||||
.. image:: images/main_dashboard.png
|
||||
.. image:: images/main_dashboard.png
|
||||
:alt: Dashboard panel
|
||||
|
||||
The graphs on the *Dashboard* tab provides an active analysis of the usage statistics for the selected server or database:
|
||||
|
||||
@@ -25,27 +26,32 @@ You can use icons in the *Sessions* table to review or control the state of a se
|
||||
|
||||
* Use the *Terminate* icon (located in the first column) to stop a session and remove the session from the table. Before the server terminates the session, you will be prompted to confirm your selection.
|
||||
* Use the *Cancel* icon (located in the second column) to terminate an active query without closing the session. Before canceling the query, the server will prompt you to confirm your selection. When you cancel a query, the value displayed in the *State* column of the table will be updated from *Active* to *Idle*. The session will remain in the table until the session is terminated.
|
||||
* Use the *Details* icon (located in the third column) to open the *Details* tab; the tab displays information about the selected session.
|
||||
* Use the *Details* icon (located in the third column) to open the *Details* tab; the tab displays information about the selected session.
|
||||
|
||||
.. image:: images/main_properties_table.png
|
||||
:alt: Properties panel
|
||||
|
||||
The *Properties* tab displays information about the object selected. Click the *Edit* icon in the toolbar under the browser tabs to launch the *Properties* dialog for the selected object.
|
||||
The *Properties* tab displays information about the object selected. Click the *Edit* icon in the toolbar under the browser tabs to launch the *Properties* dialog for the selected object.
|
||||
|
||||
.. image:: images/main_properties_icons.png
|
||||
:alt: Object editor icon
|
||||
|
||||
To preserve any changes to the *Properties* dialog, click the *Save* icon; your modifications will be displayed in the updated *Properties* tab.
|
||||
To preserve any changes to the *Properties* dialog, click the *Save* icon; your modifications will be displayed in the updated *Properties* tab.
|
||||
|
||||
.. image:: images/main_properties_edit.png
|
||||
.. image:: images/main_properties_edit.png
|
||||
:alt: Object editor window
|
||||
|
||||
Details about the object highlighted in the tree control are displayed in one or more collapsible panels. You can use the arrow to the left of each panel label to open or close a panel.
|
||||
|
||||
.. image:: images/main_sql.png
|
||||
:alt: SQL panel
|
||||
|
||||
The *SQL* tab displays the SQL script that created the highlighted object, and when applicable, a (commented out) SQL statement that will *DROP* the selected object. You can copy the SQL statements to the editor of your choice using cut and paste shortcuts.
|
||||
|
||||
.. image:: images/main_statistics.png
|
||||
:alt: Statistics panel
|
||||
|
||||
The *Statistics* tab displays the statistics gathered for each object on the tree control; the statistics displayed in the table vary by the type of object that is selected. Click a column heading to sort the table by the data displayed in the column; click again to reverse the sort order. The following table lists some of the statistics that are available:
|
||||
The *Statistics* tab displays the statistics gathered for each object on the tree control; the statistics displayed in the table vary by the type of object that is selected. Click a column heading to sort the table by the data displayed in the column; click again to reverse the sort order. The following table lists some of the statistics that are available:
|
||||
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| Panel | Description |
|
||||
@@ -101,7 +107,8 @@ The *Statistics* tab displays the statistics gathered for each object on the tre
|
||||
| *Size* | displays the size (in megabytes) of the selected database. |
|
||||
+----------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. image:: images/main_dependencies.png
|
||||
.. image:: images/main_dependencies.png
|
||||
:alt: Dependencies panel
|
||||
|
||||
The *Dependencies* tab displays the objects on which the currently selected object depends. If a dependency is dropped, the object currently selected in the pgAdmin tree control will be affected. To ensure the integrity of the entire database structure, the database server makes sure that you do not accidentally drop objects that other objects depend on; you must use the DROP CASCADE command to remove an object with a dependency.
|
||||
|
||||
@@ -114,8 +121,9 @@ The *Dependencies* table displays the following information:
|
||||
* If the field is *internal*, the selected object was created during the creation of the parent object, and will be dropped if the parent object is dropped.
|
||||
* If the field is *normal*, the selected object can be dropped without dropping the parent object.
|
||||
* If the field is *blank*, the selected object is required by the system, and cannot be dropped.
|
||||
|
||||
|
||||
.. image:: images/main_dependents.png
|
||||
:alt: Dependents panel
|
||||
|
||||
The *Dependents* tab displays a table of objects that depend on the object currently selected in the *pgAdmin* browser. A dependent object can be dropped without affecting the object currently selected in the *pgAdmin* tree control.
|
||||
|
||||
@@ -124,6 +132,7 @@ The *Dependents* tab displays a table of objects that depend on the object curre
|
||||
* The *Database* field specifies the database in which the object resides.
|
||||
|
||||
.. image:: images/main_query_tool.png
|
||||
:alt: Query tool panel
|
||||
|
||||
Additional tabs open when you access the extended functionality offered by pgAdmin tools (such as the Query tool, Debugger, or SQL editor). Use the close icon (X) located in the upper-right corner of each tab to close the tab when you are finished using the tool. Like permanent tabs, these tabs may be repositioned in the pgAdmin client window.
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
.. _pgadmin_tree_control:
|
||||
|
||||
************************
|
||||
The pgAdmin Tree Control
|
||||
************************
|
||||
*****************************
|
||||
`pgAdmin Tree Control`:index:
|
||||
*****************************
|
||||
|
||||
The left pane of the main window displays a tree control (the *pgAdmin* tree control) that provides access to the objects that reside on a server.
|
||||
The left pane of the main window displays a tree control (the *pgAdmin* tree control) that provides access to the objects that reside on a server.
|
||||
|
||||
.. image:: /images/main_left_pane.png
|
||||
:alt: Browser tree panel
|
||||
|
||||
You can expand nodes in the tree control to view the database objects that reside on a selected server. The tree control expands to display a hierarchical view:
|
||||
You can expand nodes in the tree control to view the database objects that reside on a selected server. The tree control expands to display a hierarchical view:
|
||||
|
||||
* Use the plus sign (+) to the left of a node to expand a segment of the tree control.
|
||||
* Click the minus sign (-) to the left of a node to close that node.
|
||||
* Use the plus sign (+) to the left of a node to expand a segment of the tree control.
|
||||
* Click the minus sign (-) to the left of a node to close that node.
|
||||
|
||||
Access context-sensitive menus by right-clicking on a node of the tree control to perform common tasks. Menus display options that include one or more of the following selections (options appear in alphabetical order):
|
||||
Access context-sensitive menus by right-clicking on a node of the tree control to perform common tasks. Menus display options that include one or more of the following selections (options appear in alphabetical order):
|
||||
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| Option | Action |
|
||||
@@ -49,15 +50,15 @@ Access context-sensitive menus by right-clicking on a node of the tree control t
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Maintenance...* | Click to open the :ref:`Maintenance... <maintenance_dialog>` dialog to VACUUM, ANALYZE, REINDEX, or CLUSTER. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Properties...* | Click to review or modify the currently selected object's properties. |
|
||||
| *Properties...* | Click to review or modify the currently selected object's properties. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Refresh...* | Click to refresh the currently selected object. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Reload Configuration...* | Click to update configuration files without restarting the server. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *Restore...* | Click to access the :ref:`Restore <restore_dialog>` dialog to restore database files from a backup. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *View Data* | Use the *View Data* option to access the data stored in a selected table with the *Data Output* tab of the *Query Tool*. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
| *View Data* | Use the *View Data* option to access the data stored in a selected table with the *Data Output* tab of the *Query Tool*. |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
The context-sensitive menus associated with *Tables* and nested *Table* nodes provides additional display options (options appear in alphabetical order):
|
||||
|
||||
@@ -1,42 +1,44 @@
|
||||
.. _pgadmin_user:
|
||||
|
||||
**************************
|
||||
The User Management Dialog
|
||||
**************************
|
||||
*******************************
|
||||
`User Management Dialog`:index:
|
||||
*******************************
|
||||
|
||||
When invoking pgAdmin in desktop mode, a password is randomly generated, and then ignored. If you install pgAdmin in server mode, you will be prompted for an administrator email and password for the pgAdmin client.
|
||||
When invoking pgAdmin in desktop mode, a password is randomly generated, and then ignored. If you install pgAdmin in server mode, you will be prompted for an administrator email and password for the pgAdmin client.
|
||||
|
||||
When you authenticate with pgAdmin, the server definitions associated with that login role are made available in the tree control. An administrative user can use the *User Management* dialog to
|
||||
|
||||
* add or delete pgAdmin roles
|
||||
* assign privileges
|
||||
* manage the password associated with a role
|
||||
|
||||
.. image:: images/pgadmin_user.png
|
||||
* manage the password associated with a role
|
||||
|
||||
Use the *Filter by email* search field to find a user; enter a user's email address to find a user. If the user exists, the *User Management* table will display the user's current information.
|
||||
.. image:: images/pgadmin_user.png
|
||||
:alt: pgAdmin user management window
|
||||
|
||||
Use the *Filter by email* search field to find a user; enter a user's email address to find a user. If the user exists, the *User Management* table will display the user's current information.
|
||||
|
||||
To add a user, click *Add* to add new role.
|
||||
|
||||
.. image:: images/add_pgadmin_user.png
|
||||
:alt: pgAdmin user management window add new user
|
||||
|
||||
Provide information about the new pgAdmin role in the row:
|
||||
|
||||
* Click in the *Email* field, and provide an email address for the user; this address will be used to recover the password associated with the role should the password be lost.
|
||||
* Use the drop-down listbox next to *Role* to select whether a user is an *Administrator* or a *User*.
|
||||
|
||||
* Select *Administrator* if the user will have administrative privileges within the pgAdmin client.
|
||||
* Select *Administrator* if the user will have administrative privileges within the pgAdmin client.
|
||||
* Select *User* to create a non-administrative user account.
|
||||
|
||||
* Move the *Active* switch to the *No* position if the account is not currently active; the default is *Yes*. Use this switch to disable account activity without deleting an account.
|
||||
* Move the *Active* switch to the *No* position if the account is not currently active; the default is *Yes*. Use this switch to disable account activity without deleting an account.
|
||||
* Use the *New password* field to provide the password associated with the user specified in the *Email* field.
|
||||
* Re-enter the password in the *Confirm password* field.
|
||||
* Re-enter the password in the *Confirm password* field.
|
||||
|
||||
To discard a user, and revoke access to pgAdmin, click the trash icon to the left of the row and confirm deletion in the *Delete user?* dialog.
|
||||
|
||||
Users with the *Administrator* role are able to add, edit and remove pgAdmin users, but otherwise have the same capabilities as those with the *User* role.
|
||||
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Close* button to save work. You will be prompted to return to the dialog if your selections cannot be saved.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _pgagent:
|
||||
|
||||
|
||||
pgAgent
|
||||
=======
|
||||
****************
|
||||
`pgAgent`:index:
|
||||
****************
|
||||
|
||||
pgAgent is a job scheduling agent for Postgres databases, capable of running multi-step batch or shell scripts and SQL tasks on complex schedules.
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.. _pgagent_install:
|
||||
|
||||
|
||||
********************
|
||||
`Installing pgAgent`
|
||||
********************
|
||||
***************************
|
||||
`Installing pgAgent`:index:
|
||||
***************************
|
||||
|
||||
pgAgent runs as a daemon on Unix systems, and a service on Windows systems. In most cases it will run on the database server itself - for this reason, pgAgent is not automatically configured when pgAdmin is installed. In some cases however, it may be preferable to run pgAgent on multiple systems, against the same database; individual jobs may be targeted at a particular host, or left for execution by any host. Locking prevents execution of the same instance of a job by multiple hosts.
|
||||
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
.. _pgagent_jobs:
|
||||
|
||||
|
||||
************************
|
||||
`Creating a pgAgent Job`
|
||||
************************
|
||||
*******************************
|
||||
`Creating a pgAgent Job`:index:
|
||||
*******************************
|
||||
|
||||
pgAgent is a scheduling agent that runs and manages jobs; each job consists of steps and schedules.
|
||||
pgAgent is a scheduling agent that runs and manages jobs; each job consists of steps and schedules.
|
||||
|
||||
To create or manage a job, use the pgAdmin tree control to browse to the server on which the pgAgent database objects were created. The tree control will display a *pgAgent Jobs* node, under which currently defined jobs are displayed. To add a new job, right click on the *pgAgent Jobs* node, and select *Create pgAgent Job...* from the context menu.
|
||||
To create or manage a job, use the pgAdmin tree control to browse to the server on which the pgAgent database objects were created. The tree control will display a *pgAgent Jobs* node, under which currently defined jobs are displayed. To add a new job, right click on the *pgAgent Jobs* node, and select *Create pgAgent Job...* from the context menu.
|
||||
|
||||
When the pgAgent dialog opens, use the tabs on the *pgAgent Job* dialog to define the steps and schedule that make up a pgAgent job.
|
||||
|
||||
.. image:: images/pgagent_general.png
|
||||
:alt: pgAgent dialog general tab
|
||||
|
||||
Use the fields on the *General* tab to provide general information about a job:
|
||||
|
||||
* Provide a name for the job in the *Name* field.
|
||||
* Move the *Enabled* switch to the *Yes* position to enable a job, or *No* to disable a job.
|
||||
* Use the *Job Class* drop-down to select a class (for job categorization).
|
||||
* Use the *Host Agent* field to specify the name of a machine that is running pgAgent to indicate that only that machine may execute the job. Leave the field blank to specify that any machine may perform the job.
|
||||
|
||||
* Use the *Job Class* drop-down to select a class (for job categorization).
|
||||
* Use the *Host Agent* field to specify the name of a machine that is running pgAgent to indicate that only that machine may execute the job. Leave the field blank to specify that any machine may perform the job.
|
||||
|
||||
**Note:** It is not always obvious what value to specify for the Host Agent in order to target a job step to a specific machine. With pgAgent running on the required machines and connected to the scheduler database, you can use the following query to view the hostnames as reported by each agent::
|
||||
|
||||
SELECT jagstation FROM pgagent.pga_jobagent
|
||||
@@ -29,32 +30,35 @@ Use the fields on the *General* tab to provide general information about a job:
|
||||
* Use the *Comment* field to store notes about the job.
|
||||
|
||||
.. image:: images/pgagent_steps.png
|
||||
:alt: pgAgent dialog steps tab
|
||||
|
||||
Use the *Steps* tab to define and manage the steps that the job will perform. Click the Add icon (+) to add a new step; then click the compose icon (located at the left side of the header) to open the step definition dialog:
|
||||
|
||||
.. image:: images/pgagent_step_definition.png
|
||||
:alt: pgAgent dialog definition tab
|
||||
|
||||
Use fields on the step definition dialog to define the step:
|
||||
|
||||
* Provide a name for the step in the *Name* field; please note that steps will be performed in alphanumeric order by name.
|
||||
* Use the *Enabled* switch to include the step when executing the job (*True*) or to disable the step (*False*).
|
||||
* Use the *Kind* switch to indicate if the job step invokes SQL code (*SQL*) or a batch script (*Batch*).
|
||||
|
||||
* If you select *SQL*, use the *Code* tab to provide SQL code for the step.
|
||||
* Use the *Kind* switch to indicate if the job step invokes SQL code (*SQL*) or a batch script (*Batch*).
|
||||
|
||||
* If you select *SQL*, use the *Code* tab to provide SQL code for the step.
|
||||
* If you select *Batch*, use the *Code* tab to provide the batch script that will be executed during the step.
|
||||
|
||||
|
||||
* Use the *Connection type* switch to indicate if the step is performed on a local server (*Local*) or on a remote host (*Remote*). If you specify a remote connection should be used for the step, the *Connection string* field will be enabled, and you must provide a libpq-style connection string.
|
||||
* Use the *Database* drop-down to select the database on which the job step will be performed.
|
||||
* Use the *Connection string* field to specify a libpq-style connection string to the remote server on which the step will be performed. For more information about writing a connection string, please see the `PostgreSQL documentation <http://www.postgresql.org/docs/current/static/libpq.html#libpq-connect>`_.
|
||||
* Use the *On error* drop-down to specify the behavior of pgAgent if it encounters an error while executing the step. Select from:
|
||||
|
||||
|
||||
* *Fail* - Stop the job if you encounter an error while processing this step.
|
||||
* *Success* - Mark the step as completing successfully, and continue.
|
||||
* *Success* - Mark the step as completing successfully, and continue.
|
||||
* *Ignore* - Ignore the error, and continue.
|
||||
|
||||
* Use the *Comment* field to provide a comment about the step.
|
||||
|
||||
.. image:: images/pgagent_step_definition_code.png
|
||||
:alt: pgAgent dialog step definition code tab
|
||||
|
||||
Use the context-sensitive field on the step definition dialog's *Code* tab to provide the SQL code or batch script that will be executed during the step:
|
||||
|
||||
@@ -64,25 +68,28 @@ Use the context-sensitive field on the step definition dialog's *Code* tab to pr
|
||||
When you've provided all of the information required by the step, click the compose icon to close the step definition dialog. Click the add icon (+) to add each additional step, or select the *Schedules* tab to define the job schedule.
|
||||
|
||||
.. image:: images/pgagent_schedules.png
|
||||
:alt: pgAgent dialog schedules tab
|
||||
|
||||
Click the Add icon (+) to add a schedule for the job; then click the compose icon (located at the left side of the header) to open the schedule definition dialog:
|
||||
|
||||
.. image:: images/pgagent_schedule_definition.png
|
||||
:alt: pgAgent dialog schedules definition tab
|
||||
|
||||
Use the fields on the schedule definition tab to specify the days and times at which the job will execute.
|
||||
|
||||
* Provide a name for the schedule in the *Name* field.
|
||||
* Provide a name for the schedule in the *Name* field.
|
||||
* Use the *Enabled* switch to indicate that pgAgent should use the schedule (*Yes*) or to disable the schedule (*No*).
|
||||
* Use the calendar selector in the *Start* field to specify the starting date and time for the schedule.
|
||||
* Use the calendar selector in the *End* field to specify the ending date and time for the schedule.
|
||||
* Use the *Comment* field to provide a comment about the schedule.
|
||||
|
||||
Select the *Repeat* tab to define the days on which the schedule will execute.
|
||||
|
||||
|
||||
Select the *Repeat* tab to define the days on which the schedule will execute.
|
||||
|
||||
.. image:: images/pgagent_schedule_repeat.png
|
||||
:alt: pgAgent dialog schedule repeat tab
|
||||
|
||||
Use the fields on the *Repeat* tab to specify the details about the schedule in a cron-style format. The job will execute on each date or time element selected on the *Repeat* tab.
|
||||
|
||||
|
||||
Click within a field to open a list of valid values for that field; click on a specific value to add that value to the list of selected values for the field. To clear the values from a field, click the X located at the right-side of the field.
|
||||
|
||||
Use the fields within the *Days* box to specify the days on which the job will execute:
|
||||
@@ -94,11 +101,12 @@ Use the fields within the *Days* box to specify the days on which the job will e
|
||||
Use the fields within the *Times* box to specify the times at which the job will execute:
|
||||
|
||||
* Use the *Hours* field to select the hour at which the job will execute.
|
||||
* Use the *Minutes* field to select the minute at which the job will execute.
|
||||
|
||||
Select the *Exceptions* tab to specify any days on which the schedule will *not* execute.
|
||||
|
||||
* Use the *Minutes* field to select the minute at which the job will execute.
|
||||
|
||||
Select the *Exceptions* tab to specify any days on which the schedule will *not* execute.
|
||||
|
||||
.. image:: images/pgagent_schedule_exceptions.png
|
||||
:alt: pgAgent dialog schedule exceptions tab
|
||||
|
||||
Use the fields on the *Exceptions* tab to specify days on which you wish the job to not execute; for example, you may wish for jobs to not execute on national holidays.
|
||||
|
||||
@@ -110,12 +118,14 @@ Click the Add icon (+) to add a row to the exception table, then:
|
||||
When you've finished defining the schedule, you can use the *SQL* tab to review the code that will create or modify your job.
|
||||
|
||||
.. image:: images/pgagent_sql.png
|
||||
|
||||
Click the *Save* button to save the job definition, or *Cancel* to exit the job without saving. Use the *Reset* button to remove your unsaved entries from the dialog.
|
||||
|
||||
After saving a job, the job will be listed under the *pgAgent Jobs* node of the pgAdmin tree control of the server on which it was defined. The *Properties* tab in the main pgAdmin window will display a high-level overview of the selected job, and the *Statistics* tab will show the details of each run of the job.
|
||||
:alt: pgAgent dialog sql tab
|
||||
|
||||
Click the *Save* button to save the job definition, or *Cancel* to exit the job without saving. Use the *Reset* button to remove your unsaved entries from the dialog.
|
||||
|
||||
After saving a job, the job will be listed under the *pgAgent Jobs* node of the pgAdmin tree control of the server on which it was defined. The *Properties* tab in the main pgAdmin window will display a high-level overview of the selected job, and the *Statistics* tab will show the details of each run of the job.
|
||||
|
||||
.. image:: images/pgagent_properties.png
|
||||
:alt: pgAgent object properties
|
||||
|
||||
To modify an existing job or to review detailed information about a job, right-click on a job name, and select *Properties* from the context menu.
|
||||
To modify an existing job or to review detailed information about a job, right-click on a job name, and select *Properties* from the context menu.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _preferences:
|
||||
|
||||
**********************
|
||||
The Preferences Dialog
|
||||
**********************
|
||||
***************************
|
||||
`Preferences Dialog`:index:
|
||||
***************************
|
||||
|
||||
Use options on the *Preferences* dialog to customize the behavior of the client. To open the *Preferences* dialog, select *Preferences* from the *File* menu. The left pane of the *Preferences* dialog displays a tree control; each node of the tree control provides access to options that are related to the node under which they are displayed.
|
||||
|
||||
@@ -14,30 +14,47 @@ Use options on the *Preferences* dialog to customize the behavior of the client.
|
||||
Use preferences found in the *Browser* node of the tree control to personalize your workspace.
|
||||
|
||||
.. image:: images/preferences_browser_display.png
|
||||
:alt: Preferences dialog browser display options
|
||||
|
||||
Use the fields on the *Display* panel to specify general display preferences:
|
||||
|
||||
* When the *Show system objects* switch is set to *True*, the client will display system objects such as system schemas (for example, *pg_temp*) or system columns (for example, *xmin* or *ctid*) in the tree control.
|
||||
* When the *Show system objects?* switch is set to *True*, the client will display system objects such as system schemas (for example, *pg_temp*) or system columns (for example, *xmin* or *ctid*) in the tree control.
|
||||
|
||||
* When the *Enable browser tree animation?* switch is set to *True*, the client will display the animated tree control otherwise it will be unanimated.
|
||||
|
||||
* When the *Enable dialogue/notification animation?* switch is set to *True*, the client will display the animated dialogues/notifications otherwise it will be unanimated.
|
||||
|
||||
Use the fields on the *Keyboard shortcuts* panel to configure shortcuts for the main window navigation:
|
||||
|
||||
.. image:: images/preferences_browser_keyboard_shortcuts.png
|
||||
:alt: Preferences dialog browser keyboard shortcuts section
|
||||
|
||||
* The panel displays a list of keyboard shortcuts available for the main window; select the combination of the modifier keys along with the key to configure each shortcut.
|
||||
|
||||
Use the fields on the *Nodes* panel to select the object types that will be displayed in the *Browser* tree control:
|
||||
|
||||
.. image:: images/preferences_browser_nodes.png
|
||||
:alt: Preferences dialog browser nodes section
|
||||
|
||||
* The panel displays a list of database objects; slide the switch located next to each object to *Show* or *Hide* the database object. When querying system catalogs, you can reduce the number of object types displayed to increase speed.
|
||||
|
||||
Use fields on the *Properties* panel to specify browser properties:
|
||||
|
||||
.. image:: images/preferences_browser_properties.png
|
||||
:alt: Preferences dialog browser properties section
|
||||
|
||||
* Include a value in the *Count rows if estimated less than* field to perform a SELECT count(*) if the estimated number of rows in a table (as read from the table statistics) is below the specified limit. After performing the SELECT count(*), pgAdmin will display the row count. The default is 2000.
|
||||
|
||||
**The Dashboards Node**
|
||||
* Provide a value in the *Maximum job history rows* field to limit the number of rows to show on the statistics tab for pgAgent jobs. The default is 250.
|
||||
|
||||
**The Dashboards Node**
|
||||
|
||||
Expand the *Dashboards* node to specify your dashboard display preferences.
|
||||
|
||||
.. image:: images/preferences_dashboard_graphs.png
|
||||
:alt: Preferences dialog dashboard graph options
|
||||
|
||||
Use the fields on the *Graphs* panel to specify your display preferences for the graphs on the *Dashboard* tab:
|
||||
Use the fields on the *Graphs* panel to specify your display preferences for the graphs on the *Dashboard* tab:
|
||||
|
||||
* Use the *Block I/O statistics refresh rate* field to specify the number of seconds between block I/O statistic samples displayed in graphs.
|
||||
|
||||
@@ -49,27 +66,43 @@ Use the fields on the *Graphs* panel to specify your display preferences for the
|
||||
|
||||
* Use the *Tuples out refresh rate* field to specify the number of seconds between tuples-out samples displayed in graphs.
|
||||
|
||||
**The Debugger Node**
|
||||
.. image:: images/preferences_dashboard_display.png
|
||||
:alt: Preferences dialog dashboard display options
|
||||
|
||||
* When the *Show graphs?* switch is set to *True*, graphs will be displayed on dashboards.
|
||||
|
||||
* When the *Show activity?* switch is set to *True*, activity tables will be displayed on dashboards.
|
||||
|
||||
|
||||
**The Debugger Node**
|
||||
|
||||
Expand the *Debugger* node to specify your debugger display preferences.
|
||||
|
||||
.. image:: images/preferences_debugger_display.png
|
||||
:alt: Preferences dialog debugger display options
|
||||
|
||||
* When the *Open in new browser tab* switch is set to *True*, the Debugger will open in a new browser tab when invoked.
|
||||
|
||||
**The Miscellaneous Node**
|
||||
Use the fields on the *Keyboard shortcuts* panel to configure shortcuts for the debugger window navigation:
|
||||
|
||||
.. image:: images/preferences_debugger_keyboard_shortcuts.png
|
||||
:alt: Preferences dialog debugger keyboard shortcuts section
|
||||
|
||||
**The Miscellaneous Node**
|
||||
|
||||
Expand the *Miscellaneous* node to specify miscellaneous display preferences.
|
||||
|
||||
.. image:: images/preferences_misc_user_language.png
|
||||
:alt: Preferences dialog user language section
|
||||
|
||||
* Use the *User language* drop-down listbox to select the display language for the client.
|
||||
|
||||
**The Paths Node**
|
||||
**The Paths Node**
|
||||
|
||||
Expand the *Paths* node to specify the locations of supporting utility and help files.
|
||||
|
||||
.. image:: images/preferences_paths_binary.png
|
||||
:alt: Preferences dialog binary path section
|
||||
|
||||
Use the fields on the *Binary paths* panel to specify the path to the directory that contains the utility programs (pg_dump, pg_restore, and pg_dumpall) for monitored databases:
|
||||
|
||||
@@ -80,8 +113,9 @@ Use the fields on the *Binary paths* panel to specify the path to the directory
|
||||
* Use the *PostgreSQL Binary Path* field to specify the location of the PostgreSQL utility programs. If this path is not set, pgAdmin will attempt to find the utilities in standard locations used by PostgreSQL.
|
||||
|
||||
.. image:: images/preferences_paths_help.png
|
||||
:alt: Preferences dialog binary path help section
|
||||
|
||||
Use the fields on the *Help* panel to specify the location of help files.
|
||||
Use the fields on the *Help* panel to specify the location of help files.
|
||||
|
||||
* Use the *EDB Advanced Server Help Path* to specify the path to EDB Postgres Advanced Server documentation.
|
||||
|
||||
@@ -89,11 +123,19 @@ Use the fields on the *Help* panel to specify the location of help files.
|
||||
|
||||
Please note: the default help paths include the *VERSION* placeholder; the $VERSION$ placeholder will be replaced by the current database version.
|
||||
|
||||
**The SQL Editor Node**
|
||||
**The SQL Editor Node**
|
||||
|
||||
Expand the *SQL Editor* node to access panels that allow you to specify your preferences for the SQL Editor tool.
|
||||
|
||||
.. image:: images/preferences_sql_auto_completion.png
|
||||
:alt: Preferences dialog sqleditor auto completion option
|
||||
|
||||
Use the fields on the *Auto Completion* panel to set the auto completion options.
|
||||
|
||||
* When the *Keywords in uppercase* switch is set to *True* then keywords are shown in upper case.
|
||||
|
||||
.. image:: images/preferences_sql_csv_output.png
|
||||
:alt: Preferences dialog sqleditor csv output option
|
||||
|
||||
Use the fields on the *CSV Output* panel to control the CSV output.
|
||||
|
||||
@@ -102,14 +144,20 @@ Use the fields on the *CSV Output* panel to control the CSV output.
|
||||
* Use the *CSV quoting* drop-down listbox to select the fields that will be quoted in the CSV output; select *Strings*, *All*, or *None*.
|
||||
|
||||
.. image:: images/preferences_sql_display.png
|
||||
:alt: Preferences dialog sqleditor display options
|
||||
|
||||
Use the fields on the *Display* panel to specify your preferences for the SQL Editor display.
|
||||
|
||||
* When the *Connection status* switch is set to *True*, each new instance of the SQL Editor will display connection and transaction status.
|
||||
|
||||
* Use the *Connection status refresh rate* field to specify the number of seconds between connection/transaction status updates.
|
||||
|
||||
* When the *Open in new browser tab* switch is set to *True*, each new instance of the SQL Editor will open in a new browser tab.
|
||||
|
||||
* Use the *Query info notifier timeout* field to control the behaviour of the notifier that is displayed when query execution completes. A value of *-1* will disable the notifier, and a value of 0 will display it until clicked. If a positive value above zero is specified, the notifier will be displayed for the specified number of seconds. The default is *5*.
|
||||
|
||||
.. image:: images/preferences_sql_explain.png
|
||||
:alt: Preferences dialog sqleditor explain options
|
||||
|
||||
Use the fields on the *Explain* panel to specify the level of detail included in a graphical EXPLAIN.
|
||||
|
||||
@@ -122,6 +170,7 @@ Use the fields on the *Explain* panel to specify the level of detail included in
|
||||
* When the *Verbose output?* switch is set to *True*, graphical explain details will include extended information about the query execution plan.
|
||||
|
||||
.. image:: images/preferences_sql_options.png
|
||||
:alt: Preferences dialog sqleditor options section
|
||||
|
||||
Use the fields on the *Options* panel to manage editor preferences.
|
||||
|
||||
@@ -146,6 +195,7 @@ Use the fields on the *Options* panel to manage editor preferences.
|
||||
* When the *Use spaces* switch is set to *True*, the editor will insert spaces (instead of tab characters) when the tab key or auto-indent are used.
|
||||
|
||||
.. image:: images/preferences_sql_results_grid.png
|
||||
:alt: Preferences dialog sql results grid section
|
||||
|
||||
Use the fields on the *Results grid* panel to specify your formatting preferences for copied data.
|
||||
|
||||
@@ -153,11 +203,17 @@ Use the fields on the *Results grid* panel to specify your formatting preference
|
||||
* Use the *Result copy quote character* drop-down listbox to select the quote character for copied data.
|
||||
* Use the *Result copy quoting* drop-down listbox to select which type of fields require quoting; select *All*, *None*, or *Strings*.
|
||||
|
||||
**The Storage Node**
|
||||
Use the fields on the *Keyboard shortcuts* panel to configure shortcuts for the sql editor window navigation:
|
||||
|
||||
.. image:: images/preferences_sql_keyboard_shortcuts.png
|
||||
:alt: Preferences dialog sql keyboard shortcuts section
|
||||
|
||||
**The Storage Node**
|
||||
|
||||
Expand the *Storage* node to specify your storage preferences.
|
||||
|
||||
.. image:: images/preferences_storage_options.png
|
||||
:alt: Preferences dialog storage section
|
||||
|
||||
Use the fields on the *Options* panel to specify storage preferences.
|
||||
|
||||
@@ -167,6 +223,6 @@ Use the fields on the *Options* panel to specify storage preferences.
|
||||
|
||||
* Use the *Maximum file upload size(MB)* field on the *Options* panel of the **Storage** node to specify the maximum file size for an upload.
|
||||
|
||||
* When the *Show hidden files and folders?* switch is set to *True*, the file manager will display hidden files and folders.
|
||||
* When the *Show hidden files and folders?* switch is set to *True*, the file manager will display hidden files and folders.
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
.. _primary_key_dialog:
|
||||
|
||||
**********************
|
||||
The Primary key Dialog
|
||||
**********************
|
||||
***************************
|
||||
`Primary key Dialog`:index:
|
||||
***************************
|
||||
|
||||
Use the *Primary key* dialog to create or modify a primary key constraint. A primary key constraint indicates that a column, or group of columns, uniquely identifies rows in a table. This requires that the values in the selected column(s) be both unique and not null.
|
||||
|
||||
The *Primary key* dialog organizes the development of a primary key constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
The *Primary key* dialog organizes the development of a primary key constraint through the *General* and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/primary_key_general.png
|
||||
:alt: Primary key dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify the primary key:
|
||||
|
||||
@@ -17,6 +18,7 @@ Use the fields in the *General* tab to identify the primary key:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/primary_key_definition.png
|
||||
:alt: Primary key dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the primary key constraint:
|
||||
|
||||
@@ -29,17 +31,18 @@ Use the fields in the *Definition* tab to define the primary key constraint:
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Primary key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
Your entries in the *Primary key* dialog generate a SQL command (see an example below). Use the *SQL* tab for review; revisit or switch tabs to make any changes to the SQL command.
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by user selections in the *Primary key* dialog:
|
||||
The following is an example of the sql command generated by user selections in the *Primary key* dialog:
|
||||
|
||||
.. image:: images/primary_key_sql.png
|
||||
:alt: Primary key dialog sql tab
|
||||
|
||||
The example shown demonstrates creating a primary key constraint named *dept_pkey* on the *dept_id* column of the *dept* table.
|
||||
|
||||
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
.. _procedure_dialog:
|
||||
|
||||
********************
|
||||
The Procedure Dialog
|
||||
********************
|
||||
|
||||
Use the *Procedure* dialog to create a procedure; procedures are supported by EDB Postgres Advanced Server. The *Procedure* dialog allows you to implement options of the CREATE PROCEDURE command; for more information about the CREATE PROCEDURE SQL command, please see the Database Compatibility for Oracle Developer's, available at:
|
||||
*************************
|
||||
`Procedure Dialog`:index:
|
||||
*************************
|
||||
|
||||
http://www.enterprisedb.com
|
||||
Use the *Procedure* dialog to create a procedure; procedures are supported by
|
||||
PostgreSQL v11+ and EDB Postgres Advanced Server. The *Procedure* dialog allows
|
||||
you to implement options of the CREATE PROCEDURE command.
|
||||
|
||||
The *Procedure* dialog organizes the development of a procedure through the
|
||||
following dialog tabs: *General*, *Definition*, *Options*, *Arguments*,
|
||||
*Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by
|
||||
dialog selections.
|
||||
|
||||
The *Procedure* dialog organizes the development of a procedure through the following dialog tabs: *General*, *Definition*, *Options*, *Arguments*, *Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/procedure_general.png
|
||||
:alt: Procedure dialog general tab
|
||||
|
||||
Use the fields in the *General* tab to identify a procedure:
|
||||
|
||||
@@ -22,32 +26,35 @@ Use the fields in the *General* tab to identify a procedure:
|
||||
Click the *Definition* tab to continue.
|
||||
|
||||
.. image:: images/procedure_definition.png
|
||||
:alt: Procedure dialog definition tab
|
||||
|
||||
Use the fields in the *Definition* tab to define the procedure:
|
||||
|
||||
* Use the drop-down listbox next to *Language* to select a language. The default is *edbspl*.
|
||||
* Use the drop-down listbox next to *Language* to select a language. The default is *edbspl*.
|
||||
* Use the *Code* field to specify the code that will execute when the procedure is called.
|
||||
|
||||
Click the *Options* tab to continue.
|
||||
|
||||
.. image:: images/procedure_options.png
|
||||
:alt: Procedure dialog options tab
|
||||
|
||||
Use the fields in the *Options* tab to describe or modify the behavior of the procedure:
|
||||
|
||||
* Use the drop-down listbox under *Volatility* to select one of the following. *VOLATILE* is the default value.
|
||||
|
||||
* *VOLATILE* indicates that the value can change even within a single table scan, so no optimizations can be made.
|
||||
* *STABLE* indicates that the procedure cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements.
|
||||
* *VOLATILE* indicates that the value can change even within a single table scan, so no optimizations can be made.
|
||||
* *STABLE* indicates that the procedure cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements.
|
||||
* *IMMUTABLE* indicates that the procedure cannot modify the database and always returns the same result when given the same argument values.
|
||||
|
||||
* Move the *Strict?* switch to indicate if the procedure always returns NULL whenever any of its arguments are NULL. If *Yes*, the procedure is not executed when there are NULL arguments; instead a NULL result is assumed automatically. The default is *No*.
|
||||
* Move the *Security of definer?* switch to specify that the procedure is to be executed with the privileges of the user that created it. The default is *No*.
|
||||
* Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the procedure, in units of cpu_operator_cost. If the procedure returns a set, this is the cost per returned row.
|
||||
* Move the *Leak proof?* switch to indicate whether the procedure has side effects — it reveals no information about its arguments other than by its return value. The default is *No*.
|
||||
* Use the *Estimated cost* field to specify a positive number representing the estimated execution cost for the procedure, in units of cpu_operator_cost. If the procedure returns a set, this is the cost per returned row.
|
||||
* Move the *Leak proof?* switch to indicate whether the procedure has side effects — it reveals no information about its arguments other than by its return value. The default is *No*.
|
||||
|
||||
Click the *Arguments* tab to continue.
|
||||
|
||||
.. image:: images/procedure_arguments.png
|
||||
:alt: Procedure dialog arguments tab
|
||||
|
||||
Use the fields in the *Arguments* tab to define an argument. Click *Add* to set parameters and values for the argument:
|
||||
|
||||
@@ -61,20 +68,22 @@ Click *Add* to define another argument; to discard an argument, click the trash
|
||||
Click the *Parameters* tab to continue.
|
||||
|
||||
.. image:: images/procedure_parameters.png
|
||||
:alt: Procedure dialog parameters tab
|
||||
|
||||
Use the fields in the *Parameters* tab to specify settings that will be applied when the procedure is invoked:
|
||||
|
||||
* Use the drop-down listbox next to *Parameter Name* in the *Parameters* panel to select a parameter.
|
||||
* Use the drop-down listbox next to *Parameter Name* in the *Parameters* panel to select a parameter.
|
||||
* Click the *Add* button to add the variable to *Name* field in the table.
|
||||
* Use the *Value* field to specify the value that will be associated with the selected variable. This field is context-sensitive.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
.. image:: images/procedure_security.png
|
||||
:alt: Procedure dialog security tab
|
||||
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
Use the *Security* tab to assign privileges and define security labels.
|
||||
|
||||
Use the *Privileges* panel to assign execute privileges for the procedure to a role:
|
||||
Use the *Privileges* panel to assign execute privileges for the procedure to a role:
|
||||
|
||||
* Select the name of the role from the drop-down listbox in the *Grantee* field.
|
||||
* Click inside the *Privileges* field. Check the boxes to the left of one or more privileges to grant the selected privilege to the specified user.
|
||||
@@ -82,10 +91,10 @@ Use the *Privileges* panel to assign execute privileges for the procedure to a r
|
||||
|
||||
Click *Add* to assign additional privileges; to discard a privilege, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
Use the *Security Labels* panel to define security labels applied to the procedure. Click *Add* to add each security label selection:
|
||||
Use the *Security Labels* panel to define security labels applied to the procedure. Click *Add* to add each security label selection:
|
||||
|
||||
* Specify a security label provider in the *Provider* field. The named provider must be loaded and must consent to the proposed labeling operation.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
* Specify a a security label in the *Security Label* field. The meaning of a given label is at the discretion of the label provider. PostgreSQL places no restrictions on whether or how a label provider must interpret security labels; it merely provides a mechanism for storing them.
|
||||
|
||||
Click *Add* to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the *Delete Row* popup.
|
||||
|
||||
@@ -95,12 +104,13 @@ Your entries in the *Procedure* dialog generate a SQL command (see an example be
|
||||
|
||||
**Example**
|
||||
|
||||
The following is an example of the sql command generated by selections made in the *Procedure* dialog:
|
||||
The following is an example of the sql command generated by selections made in the *Procedure* dialog:
|
||||
|
||||
.. image:: images/procedure_sql.png
|
||||
:alt: Procedure dialog sql tab
|
||||
|
||||
The example demonstrates creating a procedure that returns a list of employees from a table named *emp*. The procedure is a SECURITY DEFINER, and will execute with the privileges of the role that defined the procedure.
|
||||
|
||||
The example demonstrates creating a procedure that returns a list of employees from a table named *emp*. The procedure is a SECURITY DEFINER, and will execute with the privileges of the role that defined the procedure.
|
||||
|
||||
* Click the *Info* button (i) to access online help. View context-sensitive help in the *Tabbed browser*, where a new tab displays the PostgreSQL core documentation.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||