Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28555b387f | ||
|
|
9ad8756ec2 | ||
|
|
98815af8b6 | ||
|
|
0aeb20ee64 | ||
|
|
efeb9d6d20 | ||
|
|
9d96d6123e | ||
|
|
36ffdb93e8 | ||
|
|
ecbba79c2a | ||
|
|
13f52ad9ac | ||
|
|
849e34c2f7 | ||
|
|
fb747b8031 | ||
|
|
c6d295727c | ||
|
|
74cfeabd02 | ||
|
|
d8f9e3e87b | ||
|
|
f552519ed6 | ||
|
|
bbeb395beb | ||
|
|
acb61f0990 | ||
|
|
e6e7cf0f69 | ||
|
|
6b3a628e7a | ||
|
|
9c5b9364b6 | ||
|
|
1770c94b07 | ||
|
|
0694f59e70 | ||
|
|
98bfbcff8f | ||
|
|
42aa4dcd22 | ||
|
|
59446bb4b5 | ||
|
|
a5d39003b6 | ||
|
|
c45675e019 | ||
|
|
27d3990ba2 | ||
|
|
d326ddd21a | ||
|
|
3ad606733a | ||
|
|
38b034ec3c | ||
|
|
0766b17726 | ||
|
|
73b144c45c | ||
|
|
98283c1213 | ||
|
|
5be0d17df5 | ||
|
|
bacb57086c | ||
|
|
e5598038fa | ||
|
|
a39f43788b | ||
|
|
aae49b5324 | ||
|
|
34045efb38 | ||
|
|
292ac32db5 | ||
|
|
ccb0796317 | ||
|
|
841af6868d | ||
|
|
e2482d2294 | ||
|
|
554455fa75 | ||
|
|
255afe673a | ||
|
|
c64373435b | ||
|
|
622b67684d | ||
|
|
e5e154e268 | ||
|
|
122336eb63 | ||
|
|
17694ab467 | ||
|
|
438116c574 | ||
|
|
944cc55df7 | ||
|
|
6af8efb5b1 | ||
|
|
1f43b05c2a | ||
|
|
10ee75bb1f | ||
|
|
0aa93ac3ba | ||
|
|
f72dcc23ea | ||
|
|
1fc66406f5 | ||
|
|
e0e7d6f1f6 | ||
|
|
7f3e5c95c6 | ||
|
|
399d490342 | ||
|
|
c411520d98 | ||
|
|
3d202dceeb | ||
|
|
23f36c5a41 | ||
|
|
6db4cfd9f1 | ||
|
|
9c3da10eea | ||
|
|
a4cd2fe6c6 | ||
|
|
eb3d3980e0 | ||
|
|
28ce485cd2 | ||
|
|
a1ce6d9513 | ||
|
|
8efdc43177 | ||
|
|
8c65608946 | ||
|
|
22d458b01e | ||
|
|
0cc37de404 | ||
|
|
8f4d1f14f2 | ||
|
|
c888b282ea | ||
|
|
4a75053514 | ||
|
|
3fae181c27 | ||
|
|
c6ba8899d1 | ||
|
|
9a758f8fd3 | ||
|
|
bb25d1a986 | ||
|
|
d2ee5c4e82 | ||
|
|
605b1f4799 | ||
|
|
5fdc1ffb38 | ||
|
|
9c21c07fc4 | ||
|
|
da83c3d1b8 | ||
|
|
9df89f9bd5 | ||
|
|
aad7830d37 | ||
|
|
dae8186c2a | ||
|
|
93234c86b7 | ||
|
|
b786c4c140 | ||
|
|
cbfa614cf9 | ||
|
|
da3b3de397 | ||
|
|
cbd8f8236a | ||
|
|
38feacd04d | ||
|
|
6244463ac1 | ||
|
|
2afa3d8267 | ||
|
|
3b35aaa1d7 | ||
|
|
1bce0b5eef | ||
|
|
0bb4f005e5 | ||
|
|
317a04eafc | ||
|
|
0e489df7b0 | ||
|
|
ab094e8f16 | ||
|
|
430be1c4cb | ||
|
|
0e8f804279 | ||
|
|
1858596253 | ||
|
|
fedbcd4045 | ||
|
|
821496dc84 | ||
|
|
07f16f40cd | ||
|
|
2d7eaa63c4 | ||
|
|
d9fc9fdc4d | ||
|
|
42c7ae372f | ||
|
|
d4fe31404c | ||
|
|
f316e0533e | ||
|
|
08cf2c8310 | ||
|
|
406ada10f5 | ||
|
|
1f29859040 | ||
|
|
fcfe0929d3 | ||
|
|
e27c2c421e | ||
|
|
d92368f8e5 | ||
|
|
11ab1918ea | ||
|
|
c6bae69b6f | ||
|
|
ea87d6da8f | ||
|
|
f731ab730b | ||
|
|
3e7381414f | ||
|
|
cd311ca8a9 | ||
|
|
a0d2c45361 | ||
|
|
407f885559 | ||
|
|
6fc2e032f3 | ||
|
|
3ffeb4be45 | ||
|
|
a9794d8ab4 | ||
|
|
aedb3997b0 | ||
|
|
c7cbe0ff4a | ||
|
|
27cdb835cb | ||
|
|
06ae799d02 | ||
|
|
69f6895224 | ||
|
|
a163edec7a | ||
|
|
48660508ce | ||
|
|
f779378e8a | ||
|
|
c1aba3e055 | ||
|
|
6bbcaf6b27 | ||
|
|
dec43d98dc | ||
|
|
d7b0508305 | ||
|
|
7ac4e2a9d9 | ||
|
|
2a359d9d77 | ||
|
|
7b0c81126c | ||
|
|
6735c30292 | ||
|
|
1f082a0488 | ||
|
|
8b135f2932 | ||
|
|
d4a2f1b8cd | ||
|
|
14f462e9dc | ||
|
|
d641b47adb | ||
|
|
252e05ef29 | ||
|
|
8fb340d23b | ||
|
|
a8167f0a72 | ||
|
|
f7fa18f827 | ||
|
|
01b87d4834 | ||
|
|
868622912e | ||
|
|
6d0c4bc116 | ||
|
|
3c7742f3b2 | ||
|
|
11870006c3 | ||
|
|
ea514115c3 | ||
|
|
561ee7556f | ||
|
|
e2857332b7 | ||
|
|
d361e604c1 | ||
|
|
419bb7f995 | ||
|
|
365cbc34f5 | ||
|
|
e9ba2e036a | ||
|
|
c5d49bd862 | ||
|
|
23b649fbd1 | ||
|
|
ce1c06d7f1 | ||
|
|
fb02f8b1be | ||
|
|
4e27bf989f | ||
|
|
b5c7a108ab | ||
|
|
d6778aa915 | ||
|
|
7d2ab6a685 | ||
|
|
7f40444087 | ||
|
|
ad56e7fb12 | ||
|
|
598f69b63d | ||
|
|
7d765fea04 | ||
|
|
1283c22bb9 | ||
|
|
2817ec438a | ||
|
|
c455dda3ce | ||
|
|
3a130d68c5 | ||
|
|
6a9406237a | ||
|
|
d7da8be486 | ||
|
|
6e5b54eb1a | ||
|
|
e23d307c56 | ||
|
|
86ecf9c84e | ||
|
|
1b9c841c15 | ||
|
|
41c028f944 | ||
|
|
5799ac14ba | ||
|
|
a000dc6f60 | ||
|
|
12b7e03085 | ||
|
|
943fc25f60 | ||
|
|
f62d35bf3c | ||
|
|
e2df00fc05 | ||
|
|
36db047071 | ||
|
|
ffae65bdbe | ||
|
|
d14fb85fff | ||
|
|
13dbfff11d | ||
|
|
ed01dbd0ef | ||
|
|
cb880678cc | ||
|
|
7515e08578 | ||
|
|
c973c3387e | ||
|
|
72ba5bdaee | ||
|
|
62bb3ca097 | ||
|
|
e666b0fab0 | ||
|
|
dfbb2212c0 | ||
|
|
52fb8e197f | ||
|
|
d68eede3e6 | ||
|
|
04735e631e | ||
|
|
90b2d2e536 | ||
|
|
3448465e82 | ||
|
|
72a2db53c3 | ||
|
|
5cfe0ef115 | ||
|
|
312bcbc83f | ||
|
|
566ff7b609 | ||
|
|
45cd17af84 | ||
|
|
12ef55334b | ||
|
|
f2773354c8 | ||
|
|
431516ad61 | ||
|
|
1141930178 | ||
|
|
55402ec7d9 | ||
|
|
980d1e0292 | ||
|
|
739864c7d1 | ||
|
|
7e3bd8b88a | ||
|
|
6428ffcdaf | ||
|
|
660293456c | ||
|
|
0100997aab | ||
|
|
c80b91876a | ||
|
|
f4f0fa0e47 | ||
|
|
851c0cfff3 | ||
|
|
9a3047c89c | ||
|
|
d801ed5008 | ||
|
|
bdf9f3404f | ||
|
|
c79ac2f8d2 | ||
|
|
63f7fbcf7d | ||
|
|
d61fc8b8db | ||
|
|
527e084ef7 | ||
|
|
b6842e88ac | ||
|
|
f0327f5219 | ||
|
|
3cfc3366d7 | ||
|
|
05e067035f | ||
|
|
8b5abdfa8f | ||
|
|
782b7419f6 | ||
|
|
bbb8433af3 | ||
|
|
ef68cae1f1 | ||
|
|
9b0889842d | ||
|
|
eae18f6f14 | ||
|
|
29ed7ec881 | ||
|
|
220fdf583e | ||
|
|
628f0d254e | ||
|
|
7dde5d52d0 | ||
|
|
95cda78bdb | ||
|
|
e59eaedfd0 | ||
|
|
f17979141c | ||
|
|
3359a0de7a | ||
|
|
6e03775f05 | ||
|
|
b58f288eec | ||
|
|
140372a5cf | ||
|
|
d97431cb4f | ||
|
|
1e14b0d068 | ||
|
|
4ff0fcdd82 | ||
|
|
696fbfb8b9 | ||
|
|
be47390baf | ||
|
|
0d5a6eeeff | ||
|
|
6ddab02769 | ||
|
|
091aa62084 | ||
|
|
2058cdf662 | ||
|
|
6bc6bc7f60 | ||
|
|
370df47042 | ||
|
|
9ae49cbf31 | ||
|
|
822d384746 | ||
|
|
ce31726af5 | ||
|
|
494a8ac3fe | ||
|
|
50738db2b8 | ||
|
|
6fa6939f52 | ||
|
|
ef0e53e8fc | ||
|
|
fd2c2c4ff7 | ||
|
|
d6c4911135 | ||
|
|
6991c06937 | ||
|
|
3f16a0c52c | ||
|
|
4a6426d3e7 | ||
|
|
235a75202d | ||
|
|
55cf0cf2f9 | ||
|
|
0565f8dd78 | ||
|
|
bdf90e67a7 | ||
|
|
7144db7f5a | ||
|
|
c66840bc8e | ||
|
|
26ad6d4c5d | ||
|
|
87b64cf3c0 | ||
|
|
0f1651686b | ||
|
|
528ea88dec | ||
|
|
44ef501283 | ||
|
|
eb27fa29b1 | ||
|
|
a89ab88097 | ||
|
|
c092495b7a | ||
|
|
8e2ede21a0 | ||
|
|
15fe26a710 | ||
|
|
530017809a | ||
|
|
6c2c18106f | ||
|
|
1b20831338 | ||
|
|
6a46e43567 | ||
|
|
003889f15e | ||
|
|
a2258c83e9 | ||
|
|
370d9c72ec | ||
|
|
026969e3d1 | ||
|
|
0ec3224212 | ||
|
|
38ddea038a | ||
|
|
d6c64e8f11 | ||
|
|
4010dc80a9 | ||
|
|
9c5e42c7a6 | ||
|
|
532cbe216a | ||
|
|
1850a3a995 | ||
|
|
22776d2e14 | ||
|
|
7f1b588c69 | ||
|
|
8f88443e15 | ||
|
|
a74b9c96c1 | ||
|
|
0e59be237b | ||
|
|
6a4689599d | ||
|
|
6e54a13ba2 | ||
|
|
fa1cf7b7a3 | ||
|
|
82c9cca683 | ||
|
|
61f00a0cbb | ||
|
|
43ccfd3af6 | ||
|
|
09c388ecee | ||
|
|
89e283fbc2 | ||
|
|
b665f8fac8 | ||
|
|
283a69a21a | ||
|
|
208ee4da8c | ||
|
|
b7ad95907a | ||
|
|
9c8cf26784 | ||
|
|
dd3c7c94e6 | ||
|
|
ea787b30eb | ||
|
|
7a3f3046df | ||
|
|
25679fd542 | ||
|
|
0f17b4f738 | ||
|
|
0ab1305ddf | ||
|
|
013ad7446f | ||
|
|
70c95fcdd5 | ||
|
|
57660d131f | ||
|
|
46d4bf027d | ||
|
|
d68c967423 | ||
|
|
ff87cf5544 | ||
|
|
0a8d7a37b9 | ||
|
|
008359ad3a | ||
|
|
ffd41009ea | ||
|
|
7b2c1bb9f8 | ||
|
|
2eac2f43ac | ||
|
|
7117ce6a22 | ||
|
|
3a5684510a | ||
|
|
d4b3ded725 | ||
|
|
7479467a54 | ||
|
|
c8c5f83dfe | ||
|
|
52fc0846cd | ||
|
|
cb8a288f85 | ||
|
|
a17aa212f0 | ||
|
|
e9e8b0b433 | ||
|
|
8f45e6fe68 | ||
|
|
c4267f0878 | ||
|
|
0cb25bde63 | ||
|
|
0138dee989 | ||
|
|
00139f7750 | ||
|
|
5ff2942b4d | ||
|
|
35862b94a9 | ||
|
|
e2ce73d855 | ||
|
|
be3f9570e3 | ||
|
|
53b5043520 | ||
|
|
e12e00703f | ||
|
|
f7e43d5e50 | ||
|
|
ae814d76d3 | ||
|
|
d7eb41fff4 | ||
|
|
58ef723476 | ||
|
|
213cb440d0 | ||
|
|
2d1e835d32 | ||
|
|
cb9fffc7de | ||
|
|
c353135a3a | ||
|
|
a86604160a | ||
|
|
2ce41e77f2 | ||
|
|
051ce6afeb | ||
|
|
ce768c7f8a | ||
|
|
7f7feee8c1 | ||
|
|
1fc82d328c | ||
|
|
ba8f745f70 | ||
|
|
8869fd6eb3 | ||
|
|
39b41d7b24 | ||
|
|
a49923dba2 | ||
|
|
765a88addf | ||
|
|
0137cfaee3 | ||
|
|
c7325bea93 | ||
|
|
c6dba67d06 | ||
|
|
0c6e80f64d | ||
|
|
2b9c0a63fb | ||
|
|
3b862bd70b | ||
|
|
d1784137a5 | ||
|
|
41a8333145 | ||
|
|
81312d17e2 | ||
|
|
2b20b387e2 | ||
|
|
73530c05aa | ||
|
|
bdb7e3fde2 | ||
|
|
82d77c4608 | ||
|
|
165c4744b0 | ||
|
|
e802f2db64 | ||
|
|
d56f1b17f3 | ||
|
|
28e0220e97 | ||
|
|
d53c47e1cf | ||
|
|
b390c033cf | ||
|
|
fb1ef9ac0b | ||
|
|
c85ced4c6b | ||
|
|
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 | ||
|
|
405de59298 | ||
|
|
e8c05fbaa5 | ||
|
|
57f4131dfe | ||
|
|
f1e39dd20c | ||
|
|
def2df9028 | ||
|
|
aec86970f2 | ||
|
|
89821c0d19 | ||
|
|
711fbd5144 | ||
|
|
0810c681c3 | ||
|
|
c15d814268 | ||
|
|
e21f1e3291 | ||
|
|
49dfd6fe31 | ||
|
|
90629da524 | ||
|
|
1dd1c10255 | ||
|
|
e64bc2a821 | ||
|
|
d8194e7c0f | ||
|
|
3289a18a1a | ||
|
|
90f5af8902 | ||
|
|
88bcd3b512 | ||
|
|
6577723a2a | ||
|
|
005abab7c4 | ||
|
|
10d0307834 | ||
|
|
d44328664a | ||
|
|
ebd096f5cc | ||
|
|
3fe655e944 | ||
|
|
eae6f05b7c | ||
|
|
36d779df5d | ||
|
|
bceb6aef3c | ||
|
|
937984f2dc | ||
|
|
d02a0de8c9 | ||
|
|
107795db10 | ||
|
|
96a2987ef6 | ||
|
|
c5d1fc8189 | ||
|
|
b2e844c0ad | ||
|
|
4246a3b22f | ||
|
|
55254a649f | ||
|
|
0c5a5ba9c2 | ||
|
|
61080ce513 | ||
|
|
4bcec932a3 | ||
|
|
22c38e4562 | ||
|
|
f5718b9d56 | ||
|
|
c74b348bac | ||
|
|
3b7656b3d5 | ||
|
|
67f0c8a39e | ||
|
|
7fab041623 | ||
|
|
136ed0d3e2 | ||
|
|
bac9c77c4e | ||
|
|
7e419d1bfe | ||
|
|
1a4e21e6dd | ||
|
|
54389595da | ||
|
|
f3256aef71 | ||
|
|
35a5cf22d5 | ||
|
|
2995d6e9c5 | ||
|
|
389cf01af7 | ||
|
|
709f646f5e | ||
|
|
d54c35d74f | ||
|
|
ea82d92e41 | ||
|
|
281b6c91b5 | ||
|
|
f10733e8d4 | ||
|
|
4617a90123 | ||
|
|
362bd15c8e | ||
|
|
5bfa450a5f | ||
|
|
9ae4a03784 | ||
|
|
035c134fed | ||
|
|
10c8befb71 | ||
|
|
7db7da5b0e | ||
|
|
80c4a3fb1a | ||
|
|
fe7cfa35df | ||
|
|
d614c88ada | ||
|
|
542f2911a3 | ||
|
|
b8c2326764 | ||
|
|
fd077e2536 | ||
|
|
05a00f4ac8 | ||
|
|
38f111d969 | ||
|
|
5f5c590ffd | ||
|
|
fdb4fa454a | ||
|
|
1bc318f091 | ||
|
|
f0db93cefd | ||
|
|
8880826260 | ||
|
|
930dd8af1f | ||
|
|
b284572afe | ||
|
|
9212699936 | ||
|
|
dd8e2fe8a6 | ||
|
|
a85538a1fc | ||
|
|
5b5363e2c4 | ||
|
|
182369cbab | ||
|
|
be8d3604fb | ||
|
|
a539147a0e | ||
|
|
ce246ecce4 | ||
|
|
8ff753deb8 | ||
|
|
4568fe22f7 | ||
|
|
8cc1a007b5 | ||
|
|
0c566f132e | ||
|
|
2579458091 | ||
|
|
5fd3a7dd3d | ||
|
|
2f17ecba76 | ||
|
|
051788d040 | ||
|
|
afd65018db | ||
|
|
3c27d2fd7e | ||
|
|
537f6f0ab1 | ||
|
|
af2722faa3 | ||
|
|
cf1440f41d | ||
|
|
96df3147d6 | ||
|
|
8f070f6095 | ||
|
|
3e1caa61e1 | ||
|
|
35b57477de | ||
|
|
be0e637718 | ||
|
|
88cd68c2b9 | ||
|
|
8a4b2ea953 | ||
|
|
8b543a58fe | ||
|
|
187ab22d90 | ||
|
|
2be418706d | ||
|
|
62e70f3c4f | ||
|
|
f15f46592a | ||
|
|
b2186db562 | ||
|
|
1f23838a4c | ||
|
|
f73ce2dfc3 | ||
|
|
897bf4857a | ||
|
|
2dcd2cc77f | ||
|
|
70d31be496 | ||
|
|
23d431fb54 | ||
|
|
635d944e03 | ||
|
|
9be1364d1a | ||
|
|
714a429879 | ||
|
|
45be22b00e | ||
|
|
6a5ac730a0 | ||
|
|
706ef38e95 | ||
|
|
87549e0936 | ||
|
|
8860bc3c3e | ||
|
|
bc0320d21e | ||
|
|
61e809b636 | ||
|
|
0a1cf30abb | ||
|
|
c53c6d2f48 | ||
|
|
8adf005ef8 | ||
|
|
a2c4fb02bc | ||
|
|
a9f10ddad1 | ||
|
|
890fece73a | ||
|
|
784f3f59d8 | ||
|
|
0cb57848f8 | ||
|
|
ce5f5015b3 | ||
|
|
845b296aed | ||
|
|
a8a2947da6 | ||
|
|
56e1fd85f4 | ||
|
|
cd7d80b650 | ||
|
|
1f4a814e72 | ||
|
|
04beec1309 | ||
|
|
2f5a2b2392 | ||
|
|
63103c7a48 | ||
|
|
91406d2879 | ||
|
|
f2929046fa | ||
|
|
cb25bb0e93 | ||
|
|
d57072b156 | ||
|
|
5860de838a | ||
|
|
4b2b08174c | ||
|
|
2b64834179 | ||
|
|
0d754fc39f | ||
|
|
9c6c32e936 | ||
|
|
bcce574e83 | ||
|
|
5a132a547f | ||
|
|
9588d76b75 | ||
|
|
8ea85221f0 | ||
|
|
50a78abf48 | ||
|
|
739d8e2f1f | ||
|
|
f855ed88ce | ||
|
|
510bc6c974 | ||
|
|
cc10a4ee54 | ||
|
|
62c9376546 | ||
|
|
bcba596408 | ||
|
|
18dc938556 | ||
|
|
263e235862 | ||
|
|
354679e69b | ||
|
|
64159d11ce | ||
|
|
13665f68d8 | ||
|
|
2ddbddba33 | ||
|
|
fe757c384b | ||
|
|
62d7a1044e |
No files matched your search
@@ -12,6 +12,7 @@
|
||||
.idea
|
||||
.vscode
|
||||
/dist
|
||||
/docker-build
|
||||
/mac-build
|
||||
/pip-build
|
||||
/src-build
|
||||
@@ -27,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*
|
||||
@@ -35,6 +36,10 @@ 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
|
||||
/web/cacert.pem
|
||||
@@ -1,19 +1,19 @@
|
||||
pgAdmin 4
|
||||
|
||||
Copyright (c) 2013 - 2017, The pgAdmin Development Team
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement is
|
||||
hereby granted, provided that the above copyright notice and this paragraph and
|
||||
the following two paragraphs appear in all copies.
|
||||
|
||||
IN NO EVENT SHALL THE PGADMIN DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR
|
||||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
|
||||
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE PGADMIN DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
pgAdmin 4
|
||||
|
||||
Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement is
|
||||
hereby granted, provided that the above copyright notice and this paragraph and
|
||||
the following two paragraphs appear in all copies.
|
||||
|
||||
IN NO EVENT SHALL THE PGADMIN DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR
|
||||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
|
||||
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE PGADMIN DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
@@ -1,479 +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.8\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 "%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 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
|
||||
|
||||
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;%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
|
||||
rd "%PGBUILDPATH%\%VIRTUALENV%\Scripts" /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_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,602 +1,383 @@
|
||||
@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 )
|
||||
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
|
||||
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"
|
||||
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 = %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
|
||||
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;%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 Assembling runtime environment...
|
||||
CD "%WD%\runtime"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL "%VCVAR%" %ARCHITECTURE%
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL "%QMAKE%"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
CALL "%VCNMAKE%" clean
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
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
|
||||
|
||||
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 [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 ************************************************************
|
||||
SLEEP 5
|
||||
)
|
||||
|
||||
CD %WD%
|
||||
GOTO:eof
|
||||
|
||||
:CLEANUP_ENV
|
||||
ECHO Cleaning up private environment...
|
||||
rd "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q
|
||||
rd "%PGBUILDPATH%\%VIRTUALENV%\Scripts" /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, 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.
|
||||
exit /B 1
|
||||
GOTO EXIT
|
||||
|
||||
:EXIT
|
||||
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
|
||||
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" (
|
||||
CALL :CLEAN
|
||||
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
|
||||
|
||||
EXIT /B %ERRORLEVEL%
|
||||
REM Main build sequence Ends
|
||||
|
||||
|
||||
:CLEAN
|
||||
ECHO Removing build directory...
|
||||
IF EXIST "%PGBUILDPATH%" RD "%PGBUILDPATH%" /S /Q > nul || EXIT /B 1
|
||||
|
||||
ECHO Removing temp build directory...
|
||||
IF EXIST "%WD%\pkg\win32\Output" rd "%WD%\pkg\win32\Output" /S /Q > nul || EXIT /B 1
|
||||
|
||||
ECHO Removing installer configuration script...
|
||||
IF EXIST DEL /q "%WD%\pkg\win32\installer.iss" > nul || EXIT /B 1
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
: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"
|
||||
|
||||
REM Set VCREDISTNAME (the filename)
|
||||
for /f "delims=" %%i in ("%VCREDIST%") do set "VCREDISTNAME=%%~nxi"
|
||||
|
||||
REM Set additional variables we need
|
||||
SET "QMAKE=%QTDIR%\bin\qmake.exe"
|
||||
FOR /F "tokens=4,5 delims=. " %%a IN ('%QMAKE% -v ^| findstr /B /C:"Using Qt version "') DO SET QT_VERSION=%%a.%%b
|
||||
|
||||
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_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
|
||||
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
|
||||
|
||||
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%"
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
: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 environment...
|
||||
IF NOT EXIST "%PGBUILDPATH%" MKDIR "%PGBUILDPATH%"
|
||||
|
||||
CD "%PGBUILDPATH%"
|
||||
"%PYTHON_HOME%\Scripts\virtualenv.exe" "%VIRTUALENV%"
|
||||
|
||||
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
|
||||
|
||||
ECHO Activating virtual environment - %PGBUILDPATH%\%VIRTUALENV%...
|
||||
CALL "%PGBUILDPATH%\%VIRTUALENV%\Scripts\activate" || EXIT /B 1
|
||||
|
||||
ECHO Installing dependencies...
|
||||
CALL pip install -r "%WD%\requirements.txt" || EXIT /B 1
|
||||
CALL pip install sphinx || EXIT /B 1
|
||||
|
||||
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%
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_RUNTIME_ENV
|
||||
MKDIR "%PGBUILDPATH%\runtime"
|
||||
|
||||
CD "%WD%\web"
|
||||
|
||||
ECHO Installing javascript dependencies...
|
||||
CALL yarn install || EXIT /B 1
|
||||
|
||||
ECHO Bundling javascript...
|
||||
CALL yarn run bundle || EXIT /B 1
|
||||
|
||||
ECHO Removing webpack caches...
|
||||
RD /Q /S "%WD%\web\pgadmin\static\js\generated\.cache" 1> nul 2>&1
|
||||
|
||||
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"
|
||||
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 Building docs...
|
||||
MKDIR "%PGBUILDPATH%\docs\en_US\html"
|
||||
CD "%WD%\docs\en_US"
|
||||
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
|
||||
CALL pip uninstall -y sphinx Pygments alabaster colorama docutils imagesize requests snowballstemmer
|
||||
|
||||
ECHO Assembling runtime environment...
|
||||
CD "%WD%\runtime"
|
||||
|
||||
ECHO Running qmake...
|
||||
CALL "%QMAKE%" || EXIT /B 1
|
||||
|
||||
ECHO Cleaning the build directory...
|
||||
CALL %MAKE% clean || EXIT /B 1
|
||||
|
||||
ECHO Running make...
|
||||
CALL %MAKE% || EXIT /B 1
|
||||
|
||||
ECHO Staging pgAdmin4.exe...
|
||||
COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
ECHO Staging VC++ runtime...
|
||||
MKDIR "%PGBUILDPATH%\installer" || EXIT /B 1
|
||||
COPY "%VCREDIST%" "%PGBUILDPATH%\installer" > nul || EXIT /B 1
|
||||
|
||||
CD %WD%
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_PYTHON_ENV
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CREATE_INSTALLER
|
||||
ECHO Preparing for creation of windows installer...
|
||||
IF NOT EXIST "%TARGET_DIR%" MKDIR "%TARGET_DIR%"
|
||||
|
||||
ECHO Copying icon file...
|
||||
COPY "%WD%\pkg\win32\Resources\pgAdmin4.ico" "%PGBUILDPATH%" > nul || EXIT /B 1
|
||||
|
||||
CD "%WD%\pkg\win32"
|
||||
|
||||
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=
|
||||
IF "%ARCHITECTURE%"=="amd64" (
|
||||
set ARCMODE="x64"
|
||||
)
|
||||
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" || EXIT /B 1
|
||||
|
||||
ECHO Renaming installer...
|
||||
MOVE "%WD%\pkg\win32\Output\Setup.exe" "%TARGET_DIR%\%INSTALLERNAME%" > nul || EXIT /B 1
|
||||
|
||||
ECHO Location - %TARGET_DIR%\%INSTALLERNAME%
|
||||
ECHO Installer generated successfully.
|
||||
|
||||
CD %WD%
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:SIGN_INSTALLER
|
||||
ECHO Attempting to sign the installer...
|
||||
CALL "%SIGNTOOL%" sign /t http://timestamp.verisign.com/scripts/timstamp.dll "%TARGET_DIR%\%INSTALLERNAME%"
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO.
|
||||
ECHO ************************************************************
|
||||
ECHO * Failed to sign the installer
|
||||
ECHO ************************************************************
|
||||
PAUSE
|
||||
)
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:CLEANUP_ENV
|
||||
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
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
:USAGE
|
||||
ECHO Invalid command line options.
|
||||
ECHO Usage: "Make.bat <x86 | clean>"
|
||||
ECHO.
|
||||
|
||||
EXIT /B 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
||||
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
#########################################################################
|
||||
@@ -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,40 +32,70 @@ 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-python: install-node bundle
|
||||
check-pep8:
|
||||
cd web && pycodestyle --config=.pycodestyle .
|
||||
|
||||
check-python:
|
||||
cd web && python regression/runtests.py --exclude feature_tests
|
||||
|
||||
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-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/
|
||||
|
||||
clean-docker:
|
||||
rm -rf docker-build/
|
||||
|
||||
clean-dist:
|
||||
rm -rf 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/
|
||||
|
||||
clean-src:
|
||||
rm -rf src-build/
|
||||
|
||||
docker:
|
||||
./pkg/docker/build.sh
|
||||
|
||||
docs:
|
||||
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
|
||||
|
||||
docs-pdf:
|
||||
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx latexpdf
|
||||
|
||||
messages: msg-extract msg-update msg-compile
|
||||
|
||||
msg-compile:
|
||||
cd web && pybabel compile -d pgadmin/translations
|
||||
cd web && pybabel compile --statistics -d pgadmin/translations
|
||||
|
||||
msg-extract:
|
||||
cd web && pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin
|
||||
|
||||
@@ -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.7 or 3.4+
|
||||
|
||||
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.
|
||||
|
||||
@@ -89,7 +88,7 @@ Configuring the Python Environment
|
||||
----------------------------------
|
||||
|
||||
In order to run the Python code, a suitable runtime environment is required.
|
||||
Python versions - Python 2.6, 2.7 or 3.3+ are currently supported. It is
|
||||
Python versions - Python 2.7 or 3.4+ are currently supported. It is
|
||||
recommended that a Python Virtual Environment is setup for this purpose,
|
||||
rather than using the system Python environment. On Linux and Mac systems, the
|
||||
process is fairly simple - adapt as required for your distribution:
|
||||
@@ -196,6 +195,30 @@ http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-w
|
||||
Once a virtual environment has been created and enabled, setup can continue
|
||||
from step 4 above.
|
||||
|
||||
Building the Web Assets
|
||||
-----------------------
|
||||
|
||||
pgAdmin is dependent on a number of third party Javascript libraries. These,
|
||||
along with it's own Javascript code, SCSS/CSS code and images must be
|
||||
compiled into a "bundle" which is transferred to the browser for execution
|
||||
and rendering. This is far more efficient than simply requesting each
|
||||
asset as it's needed by the client.
|
||||
|
||||
To create the bundle, you will need the 'yarn' package management tool to be
|
||||
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 install-node
|
||||
(pgadmin4) $ make bundle
|
||||
|
||||
On Windows systems (where "make" is not available, the following commands
|
||||
can be used:
|
||||
|
||||
C:\> cd $PGADMIN4_SRC\web
|
||||
C:\$PGADMIN4_SRC\web> yarn install
|
||||
C:\$PGADMIN4_SRC\web> yarn run bundle
|
||||
|
||||
Configuring the Runtime
|
||||
-----------------------
|
||||
|
||||
@@ -206,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.
|
||||
@@ -284,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,75 @@
|
||||
.. _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 *Owner* to the *Yes* position to exclude 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 exclude 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 exclude 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 exclude the contents of unlogged tables.
|
||||
|
||||
* Move the switch next to *Comments* to the *Yes* position to exclude commands that set the comments. **Note:** This option is visible only for database server greater than or equal to 11.
|
||||
|
||||
.. 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.
|
||||
|
||||
@@ -74,15 +81,19 @@ 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.
|
||||
|
||||
* Move the switch next to *Load Via Partition Root* to the *Yes* position, so when dumping a COPY or INSERT statement for a partitioned table, target the root of the partitioning hierarchy which contains it rather than the partition itself. **Note:** This option is visible only for database server greater than or equal to 11.
|
||||
|
||||
.. 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 +105,19 @@ 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
|
||||
|
||||
Use the **Stop Process** button to stop the Backup process.
|
||||
|
||||
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,34 @@
|
||||
.. _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
|
||||
|
||||
Use the **Stop Process** button to stop the Backup process.
|
||||
|
||||
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,88 @@
|
||||
.. _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 *Encoding* drop-down listbox to select the character encoding method that should be used for the archive. **Note:** This option is visible only for database server greater than or equal to 11.
|
||||
* 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*.
|
||||
.. image:: images/backup_server_objects.png
|
||||
:alt: Type of objects option on backup server 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.
|
||||
|
||||
.. image:: images/backup_server_do_not_save.png
|
||||
:alt: Do not save option on backup server 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 exclude commands that set object ownership.
|
||||
|
||||
* Move the switch next to *Privilege* to the *Yes* position to exclude commands that create access privileges.
|
||||
|
||||
* Move the switch next to *Tablespace* to the *Yes* position to exclude tablespaces.
|
||||
|
||||
* Move the switch next to *Unlogged table data* to the *Yes* position to exclude the contents of unlogged tables.
|
||||
|
||||
* Move the switch next to *Comments* to the *Yes* position to exclude commands that set the comments. **Note:** This option is visible only for database server greater than or equal to 11.
|
||||
|
||||
.. image:: images/backup_server_queries.png
|
||||
:alt: Queries option on backup server dialog
|
||||
|
||||
* Move switches in the **Queries** field box to specify the type of statements that should be included in the backup.
|
||||
|
||||
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump the data in the form of INSERT statements and include explicit column names. Please note: this may make restoration from backup slow.
|
||||
|
||||
* Move the switch next to *Use Insert commands* to the *Yes* position to dump the data in the form of INSERT statements rather than using a COPY command. Please note: this may make restoration from backup slow.
|
||||
|
||||
* 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_server_disable.png
|
||||
:alt: Disable option on backup server 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_server_miscellaneous.png
|
||||
:alt: Miscellaneous option on backup server dialog
|
||||
|
||||
* Move switches in the **Miscellaneous** field box to specify miscellaneous backup options.
|
||||
|
||||
* Move the switch next to *With OIDs* to the *Yes* position to include object identifiers as part of the table data for each table.
|
||||
|
||||
* Move the switch next to *Verbose messages* to the *No* position to instruct *pg_dump* to exclude verbose messages.
|
||||
|
||||
* Move the switch next to *Force double quotes on identifiers* to the *Yes* position to force the quoting of all identifiers.
|
||||
|
||||
* 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).
|
||||
|
||||
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
|
||||
|
||||
Use the **Stop Process** button to stop the Backup process.
|
||||
|
||||
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:
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
.. _change_user_password:
|
||||
|
||||
************************************
|
||||
`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.
|
||||
|
||||
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.
|
||||
* Ensure that your password is changed regularly; at minimum, change it every ninety days.
|
||||
|
||||
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:
|
||||
|
||||
* Enter your existing password in the *Current Password* field.
|
||||
* Enter the desired password for in the *New Password* field.
|
||||
* Re-enter the new password in the *Confirm Password* field.
|
||||
|
||||
Click the *Change Password* button to change your password; click *Close* to exit the dialog.
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
.. _clear_saved_passwords:
|
||||
|
||||
******************************
|
||||
`Clear Saved Passwords`:index:
|
||||
******************************
|
||||
|
||||
Use *Clear Saved Password* functionality to clear the saved password for the database server.
|
||||
|
||||
.. image:: images/clear_saved_password.png
|
||||
|
||||
*Clear Saved Password* shows in the context menu for the selected server as well as under the *Object* menu on the top menu bar.
|
||||
|
||||
Use *Clear SSH Tunnel Password* functionality to clear the saved password of SSH Tunnel to connect to the database server.
|
||||
|
||||
.. image:: images/clear_tunnel_password.png
|
||||
|
||||
*Clear SSH Tunnel Password* shows in the context menu for the selected server as well as under the *Object* menu on the top menu bar.
|
||||
|
||||
**Note:** It will be enabled/visible when the password for the selected database server is already saved.
|
||||
@@ -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,19 +1,22 @@
|
||||
.. _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.
|
||||
|
||||
Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
||||
Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
||||
|
||||
* Ensure there's a blank line immediately following any copyright headers.
|
||||
|
||||
|
||||
@@ -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++
|
||||
---
|
||||
|
||||
@@ -167,7 +170,7 @@ with the required file header is shown below::
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
||||
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
@@ -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:
|
||||
The example shown demonstrates creating a collation named *french* that uses the rules specified for the locale, *fr-BI-x-icu. 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
|
||||
|
||||
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.
|
||||
|
||||
@@ -111,13 +111,16 @@ html_theme = 'classic'
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
'collapsiblesidebar': True,
|
||||
'relbarbgcolor': '#2C76B4',
|
||||
'relbarbgcolor': '#326690',
|
||||
'sidebarbgcolor': '#E2E2E2',
|
||||
'sidebarbtncolor': '#2C76B4',
|
||||
'sidebartextcolor': '#000',
|
||||
'sidebarlinkcolor': '#337AB7',
|
||||
'footerbgcolor': '#333',
|
||||
'codebgcolor': '#D9EDF7',
|
||||
'sidebarbtncolor': '#326690',
|
||||
'sidebartextcolor': '#222222',
|
||||
'sidebarlinkcolor': '#326690',
|
||||
'footerbgcolor': '#222222',
|
||||
'codebgcolor': '#d6effc',
|
||||
'textcolor': '#222222',
|
||||
'headbgcolor': '#E2E2E2',
|
||||
'headtextcolor': '#326690',
|
||||
'bodyfont': '"Helvetica Neue", Helvetica, Arial, sans-serif',
|
||||
'headfont': '"Helvetica Neue", Helvetica, Arial, sans-serif'
|
||||
}
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
.. _connect_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,29 @@
|
||||
.. _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.
|
||||
|
||||
|
||||
In case of SSH Tunneling, *Connect to Server* dialog will prompt for SSH Tunnel and Database server passwords if not already saved.
|
||||
|
||||
.. image:: images/connect_to_tunneled_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 respective *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,10 +1,15 @@
|
||||
.. _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.
|
||||
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.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -12,7 +17,10 @@ Contents:
|
||||
|
||||
server_group_dialog
|
||||
|
||||
Use the fields on the *Server* dialog to define the connection properties for each new server that you wish to manage with pgAdmin. To open the *Server* dialog, right-click on the *Servers* node of the tree control, and select *Server* from the *Create* menu.
|
||||
Use the fields on the *Server* dialog to define the connection properties for
|
||||
each new server that you wish to manage with pgAdmin. To open the *Server*
|
||||
dialog, right-click on the *Servers* node of the tree control, and select
|
||||
*Server* from the *Create* menu.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -20,11 +28,21 @@ Contents:
|
||||
|
||||
server_dialog
|
||||
|
||||
After defining a server connection, right-click on the server name, and select *Connect to server* to authenticate with the server, and start using pgAdmin to manage objects that reside on the server.
|
||||
After defining a server connection, right-click on the server name, and select
|
||||
*Connect to server* to authenticate with the server, and start using pgAdmin to
|
||||
manage objects that reside on the server.
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
|
||||
connect_to_server
|
||||
connect_error
|
||||
connect_error
|
||||
|
||||
Server definitions (and their groups) can be exported to a JSON file and
|
||||
re-imported to the same or a different system to enable easy pre-configuration
|
||||
of pgAdmin.
|
||||
|
||||
.. toctree::
|
||||
|
||||
export_import_servers
|
||||
@@ -0,0 +1,143 @@
|
||||
.. _container_deployment:
|
||||
|
||||
**************************************
|
||||
`Container Deployment`:index:
|
||||
**************************************
|
||||
|
||||
pgAdmin can be deployed in a container using the image at:
|
||||
|
||||
https://hub.docker.com/r/dpage/pgadmin4/
|
||||
|
||||
PostgreSQL Utilities
|
||||
********************
|
||||
|
||||
The PostgreSQL utilities *pg_dump*, *pg_dumpall*, *pg_restore* and *psql* are
|
||||
included in the container to allow backups to be created and restored and other
|
||||
maintenance functions to be executed. Multiple versions are included in the
|
||||
following directories to allow use with different versions of the database
|
||||
server:
|
||||
|
||||
* PostgreSQL 9.4: /usr/local/pgsql-9.4
|
||||
* PostgreSQL 9.5: /usr/local/pgsql-9.5
|
||||
* PostgreSQL 9.6: /usr/local/pgsql-9.6
|
||||
* PostgreSQL 10: /usr/local/pgsql-10
|
||||
* PostgreSQL 11: /usr/local/pgsql-11
|
||||
|
||||
The most recent version of the utilities is used by default; this may be
|
||||
changed in the :ref:`preferences`.
|
||||
|
||||
Environment Variables
|
||||
*********************
|
||||
|
||||
The container will accept the following variables at startup:
|
||||
|
||||
*PGADMIN_DEFAULT_EMAIL*
|
||||
|
||||
This is the email address used when setting up the initial administrator account
|
||||
to login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_DEFAULT_PASSWORD*
|
||||
|
||||
This is the password used when setting up the initial administrator account to
|
||||
login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_ENABLE_TLS*
|
||||
|
||||
Default: <null>
|
||||
|
||||
If left un-set, the container will listen on port 80 for connections in plain
|
||||
text. If set to any value, the container will listen on port 443 for TLS
|
||||
connections.
|
||||
|
||||
When TLS is enabled, a certificate and key must be provided. Typically these
|
||||
should be stored on the host file system and mounted from the container. The
|
||||
expected paths are /certs/server.crt and /certs/server.key
|
||||
|
||||
*PGADMIN_LISTEN_ADDRESS*
|
||||
|
||||
Default: [::]
|
||||
|
||||
Specify the local address that the servers listens on. The default should work
|
||||
for most users - in IPv4-only environments, this may need to be set to
|
||||
127.0.0.1.
|
||||
|
||||
*PGADMIN_LISTEN_PORT*
|
||||
|
||||
Default: 80 or 443 (if TLS is enabled)
|
||||
|
||||
Allows the port that the server listens on to be set to a specific value rather
|
||||
than using the default.
|
||||
|
||||
*GUNICORN_THREADS*
|
||||
|
||||
Default: 25
|
||||
|
||||
Adjust the number of threads the Gunicorn server uses to handle incoming
|
||||
requests. This should typically be left as-is, except in highly loaded systems
|
||||
where it may be increased.
|
||||
|
||||
Mapped Files and Directories
|
||||
****************************
|
||||
|
||||
The following files or directories can be mapped from the container onto the
|
||||
host machine to allow configuration to be customised and shared between
|
||||
instances:
|
||||
|
||||
*/var/lib/pgadmin*
|
||||
|
||||
This is the working directory in which pgAdmin stores session data, user files,
|
||||
configuration files, and it's configuration database. Mapping this directory
|
||||
onto the host machine gives you an easy way to maintain configuration between
|
||||
|
||||
invocations of the container.
|
||||
|
||||
*/pgadmin4/config_local.py*
|
||||
|
||||
This file can be used to override configuration settings in pgAdmin. Settings
|
||||
found in config.py can be overridden with deployment specific values if
|
||||
required.
|
||||
|
||||
*/pgadmin4/servers.json*
|
||||
|
||||
If this file is mapped, server definitions found in it will be loaded at launch
|
||||
time. This allows connection information to be pre-loaded into the instance of
|
||||
pgAdmin in the container.
|
||||
|
||||
*/certs/server.cert*
|
||||
|
||||
If TLS is enabled, this file will be used as the servers TLS certificate.
|
||||
|
||||
*/certs/server.key*
|
||||
|
||||
If TLS is enabled, this file will be used as the key file for the servers TLS
|
||||
certificate.
|
||||
|
||||
Examples
|
||||
********
|
||||
|
||||
Run a simple container over port 80:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 80:80 \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-d dpage/pgadmin4
|
||||
|
||||
Run a TLS secured container using a shared config/storage directory in
|
||||
/private/var/lib/pgadmin on the host, and servers pre-loaded from
|
||||
/tmp/servers.json on the host:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 443:443 \
|
||||
-v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
|
||||
-v "/path/to/certificate.cert:/certs/server.cert" \
|
||||
-v "/path/to/certificate.key:/certs/server.key" \
|
||||
-v "/tmp/servers.json:/servers.json" \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-e "PGADMIN_ENABLE_TLS=True" \
|
||||
-d dpage/pgadmin4
|
||||
@@ -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.
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
*************************
|
||||
|
||||
.. 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,10 +1,14 @@
|
||||
.. _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.
|
||||
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.
|
||||
|
||||
Contents:
|
||||
|
||||
@@ -12,4 +16,5 @@ Contents:
|
||||
:maxdepth: 2
|
||||
|
||||
desktop_deployment
|
||||
server_deployment
|
||||
server_deployment
|
||||
container_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),
|
||||
@@ -66,13 +81,10 @@ The configuration settings:
|
||||
+==========================+====================+===============================================================+
|
||||
| ApplicationPath | String | The directory containing pgAdmin4.py |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| BrowserCommand | String | An alternate command to run instead of the default browser. |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| ConnectionTimeout | Integer | The number of seconds to wait for application server startup. |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| PythonPath | String | The Python module search path |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| Browser/Geometry | Binary | The runtime window's size/shape |
|
||||
+--------------------------+--------------------+---------------------------------------------------------------+
|
||||
| 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.
|
||||
|
||||
@@ -12,3 +12,4 @@ Contents:
|
||||
|
||||
debugger
|
||||
query_tool
|
||||
editgrid
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
.. _editgrid:
|
||||
|
||||
|
||||
***********************************
|
||||
`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.
|
||||
|
||||
.. 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 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.
|
||||
|
||||
.. image:: images/editgrid_toolbar.png
|
||||
:alt: Edit grid toolbar
|
||||
|
||||
Hover over an icon to display a tooltip that describes the icon's functionality.
|
||||
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| Icon | Behavior | Shortcut |
|
||||
+======================+===================================================================================================+=============+
|
||||
| *Save* | Use the *Save* icon to save your changes to the currently displayed table contents. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Find* | Use options on the *Find* menu to access Search and Replace functionality or to Jump to another | Ctrl/Cmd +F |
|
||||
| | line. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Copy* | Click the *Copy* icon to copy the currently selected data. | Ctrl+C |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Paste Row* | Click the *Paste Row* icon to paste the content that is currently on the clipboard. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Delete Row* | Use the *Delete Row* icon to delete all the selected rows from the output panel. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *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: | |
|
||||
| | | |
|
||||
| | Use options on the *Filter* menu to quick-sort or quick-filter the data set: | |
|
||||
| | | |
|
||||
| | * Filter: This option opens a dialog that allows you to define a filter. A filter is a | |
|
||||
| | condition that is supplied to an arbitrary WHERE clause that restricts the result set. | |
|
||||
| | | |
|
||||
| | * Remove Filter: This option removes all selection / exclusion filter conditions. | |
|
||||
| | | |
|
||||
| | * By Selection: This option refreshes the data set and displays only those rows whose | |
|
||||
| | column value matches the value in the cell currently selected. | |
|
||||
| | | |
|
||||
| | * Exclude Selection: This option refreshes the data set and excludes those rows whose | |
|
||||
| | column value matches the value in the cell currently selected. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *No limit* | Use the *No limit* drop-down listbox to specify how many rows to display in the output panel. | |
|
||||
| | Select from: *No limit* (the default), *1000 rows*, *500 rows*, or *100 rows*. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Execute/Refresh* | Click the *Execute/Refresh* icon to execute the SQL command that is displayed in the top panel. | F5 |
|
||||
| | If you have not saved modifications to the content displayed in the data grid, you will be | |
|
||||
| | prompted to confirm the execution. To preserve your changes before refreshing the content, click | |
|
||||
| | the *Save* toolbar button before executing the refresh. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Stop* | Click the *Stop* icon to cancel the execution of the currently running query. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Clear History* | Use the *Clear History* drop-down menu to erase the contents of the *History* tab. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
| *Download as CSV* | Click the *Download as CSV* icon to download the result set of the current query to a | F8 |
|
||||
| | comma-separated list. You can control the CSV settings through | |
|
||||
| | *Preferences -> SQL Editor -> CSV output* dialogue. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+-------------+
|
||||
|
||||
**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].
|
||||
|
||||
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 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.
|
||||
|
||||
To add a new row to the table, enter data into the last (unnumbered) row of the table. As soon as you store the data, the row is assigned a row number, and a fresh empty line is added to the data grid.
|
||||
|
||||
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 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.
|
||||
|
||||
**Geometry Data Viewer**
|
||||
|
||||
If PostGIS is installed, you can view GIS objects in a map by selecting row(s) and clicking the 'View Geometry' button in the column. If no rows are selected, the entire data set will be rendered:
|
||||
|
||||
.. image:: images/geometry_viewer.png
|
||||
:alt: Geometry Viewer Button
|
||||
|
||||
You can adjust the layout by dragging the title of the panel. To view the properties of the geometries directly in map, just click the specific geometry:
|
||||
|
||||
.. image:: images/geometry_viewer_property_table.png
|
||||
:alt: Geometry Viewer Property Table
|
||||
|
||||
Notes:
|
||||
|
||||
- *Supported data types:* The Geometry Viewer supports 2D and 3DM geometries in EWKB format including `Point, LineString, Polygon MultiPoint, MultiLineString, MultiPolygon and GeometryCollection`.
|
||||
|
||||
- *SRIDs:* If there are geometries with different SRIDs in the same column, the viewer will render geometries with the same SRID in the map. If SRID=4326 the OSM tile layer will be added into the map.
|
||||
|
||||
- *Data size:* For performance reasons, the viewer will render no more than 100000 geometries, totaling up to 20MB.
|
||||
|
||||
- *Internet access:* An internet connection is required for the Geometry Viewer to function correctly.
|
||||
|
||||
**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.
|
||||
@@ -45,15 +48,18 @@ Use the fields in the *Columns* tab to to specify the column(s) to which the con
|
||||
* Use the *NULLs order* column to specify the placement of NULL values (when sorted). Specify *FIRST* or *LAST*.
|
||||
* Use the drop-down list next to *Operator* to specify a comparison or conditional operator.
|
||||
|
||||
Use *Include columns* field to specify columns for *INCLUDE* clause of the constraint. This option is available in Postgres 11 and later.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
.. _export_import_servers:
|
||||
|
||||
****************************************
|
||||
`Exporting and importing Servers`:index:
|
||||
****************************************
|
||||
|
||||
Server definitions (and their groups) can be exported to a JSON file and
|
||||
re-imported to the same or a different system to enable easy pre-configuration
|
||||
of pgAdmin. The ``setup.py`` script is used for this purpose.
|
||||
|
||||
.. note:: To export or import servers, you must use the Python interpreter that
|
||||
is normally used to run pgAdmin to ensure that the required Python
|
||||
packages are available. In most packages, this can be found in the
|
||||
Python Virtual Environment that can be found in the installation
|
||||
directory. When using platform-native packages, the system installation
|
||||
of Python may be the one used by pgAdmin.
|
||||
|
||||
**Exporting Servers**
|
||||
|
||||
To export the servers defined in an installation, simply invoke ``setup.py`` with
|
||||
the ``--dump-servers`` command line option, followed by the name (and if required,
|
||||
path) to the desired output file. By default, servers owned by the desktop mode
|
||||
user will be dumped (pgadmin4@pgadmin.org by default - see the DESKTOP_USER
|
||||
setting in ``config.py``). This can be overridden with the ``--user`` command
|
||||
line option. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
/path/to/python /path/to/setup.py --dump-servers output_file.json
|
||||
|
||||
# or, to specify a non-default user name:
|
||||
|
||||
/path/to/python /path/to/setup.py --dump-servers output_file.json --user user@example.com
|
||||
|
||||
To export only certain servers, use the ``--servers`` option and list one or
|
||||
more server IDs. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
/path/to/python /path/to/setup.py --dump-servers output_file.json --server 1 2 5
|
||||
|
||||
**Importing Servers**
|
||||
|
||||
To import the servers defined in a JSON file, simply invoke ``setup.py`` with
|
||||
the ``--load-servers`` command line option, followed by the name (and if required,
|
||||
path) of the JSON file containing the server definitions. Servers will be owned
|
||||
by the desktop mode user (pgadmin4@pgadmin.org by default - see the DESKTOP_USER
|
||||
setting in ``config.py``). This can be overridden with the ``--user`` command
|
||||
line option. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
/path/to/python /path/to/setup.py --load-servers input_file.json
|
||||
|
||||
# or, to specify a non-default user name to own the new servers:
|
||||
|
||||
/path/to/python /path/to/setup.py --load-servers input_file.json --user user@example.com
|
||||
|
||||
If any Servers are defined with a Server Group that is not already present in
|
||||
the configuration database, the required Group will be created.
|
||||
|
||||
**JSON format**
|
||||
|
||||
The JSON file format used when importing or exporting servers is quite
|
||||
straightforward and simply contains a list of servers, with a number of
|
||||
attributes. The following attributes are required to be present in every server
|
||||
definition: Name, Group, Port, Username, SSLMode, MaintenanceDB and one of Host,
|
||||
HostAddr or Service.
|
||||
|
||||
Password fields cannot be imported or exported.
|
||||
|
||||
The following example shows both a minimally defined and a fully defined server:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
{
|
||||
"Servers": {
|
||||
"1": {
|
||||
"Name": "Minimally Defined Server",
|
||||
"Group": "Server Group 1",
|
||||
"Port": 5432,
|
||||
"Username": "postgres",
|
||||
"Host": "localhost",
|
||||
"SSLMode": "prefer",
|
||||
"MaintenanceDB": "postgres"
|
||||
},
|
||||
"2": {
|
||||
"Name: "Fully Defined Server",
|
||||
"Group": "Server Group 2",
|
||||
"Host": "host.domain.com",
|
||||
"HostAddr": "192.168.1.2",
|
||||
"Port": 5432,
|
||||
"MaintenanceDB": "postgres",
|
||||
"Username": "postgres",
|
||||
"Role": "my_role_name",
|
||||
"SSLMode": "require",
|
||||
"Comment": "This server has every option configured in the JSON",
|
||||
"DBRestriction": "live_db test_db",
|
||||
"PassFile": "/path/to/pgpassfile",
|
||||
"SSLCert": "/path/to/sslcert.crt",
|
||||
"SSLKey": "/path/to/sslcert.key",
|
||||
"SSLRootCert": "/path/to/sslroot.crt",
|
||||
"SSLCrl": "/path/to/sslcrl.crl",
|
||||
"SSLCompression": 1,
|
||||
"BGColor": "#ff9900",
|
||||
"FGColor": "#000000",
|
||||
"Service": "postgresql-10",
|
||||
"Timeout": 60,
|
||||
"UseSSHTunnel": 1,
|
||||
"TunnelHost": "192.168.1.253",
|
||||
"TunnelPort": 22,
|
||||
"TunnelUsername": "username",
|
||||
"TunnelAuthentication": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -15,26 +24,49 @@ Contents:
|
||||
|
||||
server_deployment
|
||||
pgadmin_login
|
||||
pgadmin_user
|
||||
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:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
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 behaviour 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:
|
||||
|
||||
@@ -42,15 +74,12 @@ Contents:
|
||||
|
||||
browser
|
||||
pgadmin_menu_bar
|
||||
pgadmin_toolbar
|
||||
pgadmin_tabbed_browser
|
||||
pgadmin_tree_control
|
||||
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*:
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
|
||||
connecting
|
||||
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*
|
||||
in the next section.
|
||||
@@ -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.
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 281 KiB After Width: | Height: | Size: 299 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 31 KiB |