Artifact
77aaae0fe821aff22b0c99c06b08d10ac06e7ad4:
Wiki page
[PostgreSQL] by
sandro
2018-08-03 12:06:23.
0000: 44 20 32 30 31 38 2d 30 38 2d 30 33 54 31 32 3a D 2018-08-03T12:
0010: 30 36 3a 32 33 2e 32 35 31 0a 4c 20 50 6f 73 74 06:23.251.L Post
0020: 67 72 65 53 51 4c 0a 55 20 73 61 6e 64 72 6f 0a greSQL.U sandro.
0030: 57 20 32 32 37 34 0a 42 61 63 6b 20 74 6f 20 3c W 2274.Back to <
0040: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f a href="https://
0050: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f www.gaia-gis.it/
0060: 66 6f 73 73 69 6c 2f 73 70 61 74 69 61 6c 69 74 fossil/spatialit
0070: 65 5f 67 75 69 2f 77 69 6b 69 3f 6e 61 6d 65 3d e_gui/wiki?name=
0080: 73 70 61 74 69 61 6c 69 74 65 2d 67 75 69 22 3e spatialite-gui">
0090: 6d 61 69 6e 20 57 69 6b 69 20 70 61 67 65 3c 2f main Wiki page</
00a0: 61 3e 3c 68 72 3e 3c 62 72 3e 0d 0a 3c 68 31 3e a><hr><br>..<h1>
00b0: 54 68 65 20 47 55 49 20 61 73 20 61 20 50 6f 73 The GUI as a Pos
00c0: 74 67 72 65 53 51 4c 20 63 6c 69 65 6e 74 3c 2f tgreSQL client</
00d0: 68 31 3e 0d 0a 53 74 61 72 74 69 6e 67 20 66 72 h1>..Starting fr
00e0: 6f 6d 20 76 65 72 73 69 6f 6e 20 3c 62 3e 32 2e om version <b>2.
00f0: 31 2e 30 3c 2f 62 3e 20 74 68 65 20 47 55 49 20 1.0</b> the GUI
0100: 68 61 73 20 74 68 65 20 63 61 70 61 62 69 6c 69 has the capabili
0110: 74 79 20 74 6f 20 73 75 70 70 6f 72 74 20 63 6f ty to support co
0120: 6e 6e 65 63 74 69 6f 6e 73 20 74 6f 20 65 78 74 nnections to ext
0130: 65 72 6e 61 6c 20 3c 62 3e 50 6f 73 74 67 72 65 ernal <b>Postgre
0140: 53 51 4c 20 2f 20 50 6f 73 74 47 49 53 3c 2f 62 SQL / PostGIS</b
0150: 3e 20 64 61 74 61 62 61 73 65 73 2e 3c 62 72 3e > databases.<br>
0160: 0d 0a 54 68 69 73 20 66 75 6e 63 74 69 6f 6e 61 ..This functiona
0170: 6c 69 74 79 20 69 73 20 6d 61 69 6e 6c 79 20 62 lity is mainly b
0180: 61 73 65 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d ased on <a href=
0190: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 "https://www.gai
01a0: 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f a-gis.it/fossil/
01b0: 76 69 72 74 75 61 6c 70 67 2f 77 69 6b 69 3f 6e virtualpg/wiki?n
01c0: 61 6d 65 3d 74 75 74 6f 72 69 61 6c 22 3e 6c 69 ame=tutorial">li
01d0: 62 76 69 72 74 75 61 6c 70 67 3c 2f 61 3e 2c 20 bvirtualpg</a>,
01e0: 74 68 61 74 20 69 73 20 6e 6f 77 20 61 20 72 65 that is now a re
01f0: 71 75 69 72 65 64 20 64 65 70 65 6e 64 65 6e 63 quired dependenc
0200: 79 20 66 6f 72 20 74 68 65 20 47 55 49 20 74 6f y for the GUI to
0210: 6f 6c 2e 0d 0a 54 68 65 20 70 72 65 73 65 6e 74 ol...The present
0220: 20 74 75 74 6f 72 69 61 6c 20 69 73 20 69 6e 74 tutorial is int
0230: 65 6e 64 65 64 20 74 6f 20 71 75 69 63 6b 6c 79 ended to quickly
0240: 20 65 78 70 6c 61 69 6e 20 68 6f 77 20 74 68 65 explain how the
0250: 20 50 6f 73 74 67 72 65 53 51 4c 20 73 75 70 70 PostgreSQL supp
0260: 6f 72 74 20 69 73 20 69 6d 70 6c 65 6d 65 6e 74 ort is implement
0270: 65 64 20 62 79 20 3c 62 3e 73 70 61 74 69 61 6c ed by <b>spatial
0280: 69 74 65 5f 67 75 69 3c 2f 62 3e 2e 3c 62 72 3e ite_gui</b>.<br>
0290: 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c <br>..<table cel
02a0: 6c 73 70 61 63 69 6e 67 3d 22 36 22 20 63 65 6c lspacing="6" cel
02b0: 6c 70 61 64 64 69 6e 67 3d 22 36 22 20 62 67 63 lpadding="6" bgc
02c0: 6f 6c 6f 72 3d 22 66 30 66 66 65 30 22 20 77 69 olor="f0ffe0" wi
02d0: 64 74 68 3d 22 31 30 30 25 22 20 62 6f 72 64 65 dth="100%" borde
02e0: 72 3d 22 31 22 3e 0d 0a 3c 74 72 3e 3c 74 64 20 r="1">..<tr><td
02f0: 63 6f 6c 73 70 61 6e 3d 22 32 22 20 61 6c 69 67 colspan="2" alig
0300: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 68 33 3e 45 n="center"><h3>E
0310: 73 74 61 62 6c 69 73 68 69 6e 67 20 61 20 43 6f stablishing a Co
0320: 6e 6e 65 63 74 69 6e 67 20 74 6f 20 61 20 50 6f nnecting to a Po
0330: 73 74 67 72 65 53 51 4c 20 44 42 4d 53 3c 2f 68 stgreSQL DBMS</h
0340: 33 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 3><hr></td></tr>
0350: 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 3c 62 3e 31 ..<tr>..<td><b>1
0360: 2e 3c 2f 62 3e 20 79 6f 75 20 63 61 6e 20 70 72 .</b> you can pr
0370: 65 73 73 20 74 68 65 20 61 70 70 72 6f 70 72 69 ess the appropri
0380: 61 74 65 20 62 75 74 74 6f 6e 20 66 72 6f 6d 20 ate button from
0390: 74 68 65 20 54 6f 6f 6c 62 61 72 3c 2f 74 64 3e the Toolbar</td>
03a0: 0d 0a 3c 74 64 3e 3c 69 6d 67 20 73 72 63 3d 22 ..<td><img src="
03b0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 https://www.gaia
03c0: 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e -gis.it/gaia-sin
03d0: 73 2f 67 75 69 2d 70 6f 73 74 67 72 65 73 2f 67 s/gui-postgres/g
03e0: 75 69 31 2e 70 6e 67 22 20 61 6c 74 3d 22 63 6f ui1.png" alt="co
03f0: 6e 6e 65 63 74 69 6f 6e 20 31 22 3e 3c 2f 74 64 nnection 1"></td
0400: 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a >..</tr>..<tr>..
0410: 3c 74 64 3e 3c 62 3e 32 2e 3c 2f 62 3e 20 79 6f <td><b>2.</b> yo
0420: 75 20 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 u can select the
0430: 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 74 65 appropriate ite
0440: 6d 20 66 72 6f 6d 20 74 68 65 20 6d 61 69 6e 20 m from the main
0450: 4d 65 6e 75 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c Menu</td>..<td><
0460: 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f img src="https:/
0470: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
0480: 2f 67 61 69 61 2d 73 69 6e 73 2f 67 75 69 2d 70 /gaia-sins/gui-p
0490: 6f 73 74 67 72 65 73 2f 67 75 69 32 2e 70 6e 67 ostgres/gui2.png
04a0: 22 20 61 6c 74 3d 22 63 6f 6e 6e 65 63 74 69 6f " alt="connectio
04b0: 6e 20 32 22 3e 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 n 2"></td>..</tr
04c0: 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a >..</tr>..<tr>..
04d0: 3c 74 64 3e 3c 62 3e 33 2e 3c 2f 62 3e 20 61 6e <td><b>3.</b> an
04e0: 64 20 66 69 6e 61 6c 6c 79 20 79 6f 75 20 63 61 d finally you ca
04f0: 6e 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 n select the app
0500: 72 6f 70 72 69 61 74 65 20 69 74 65 6d 20 66 72 ropriate item fr
0510: 6f 6d 20 74 68 65 20 63 6f 6e 74 65 78 74 20 4d om the context M
0520: 65 6e 75 20 74 68 61 74 20 77 69 6c 6c 20 61 70 enu that will ap
0530: 70 65 61 72 20 62 79 20 63 6c 69 63 6b 69 6e 67 pear by clicking
0540: 20 74 68 65 20 3c 62 3e 6c 65 66 74 3c 2f 62 3e the <b>left</b>
0550: 20 62 75 74 74 6f 6e 20 6f 66 20 74 68 65 20 6d button of the m
0560: 6f 75 73 65 20 6f 76 65 72 20 74 68 65 20 3c 62 ouse over the <b
0570: 3e 50 6f 73 74 72 65 53 51 4c 3c 2f 62 3e 20 6d >PostreSQL</b> m
0580: 61 69 6e 20 6e 6f 64 65 20 66 72 6f 6d 20 74 68 ain node from th
0590: 65 20 54 61 62 6c 65 20 54 72 65 65 2e 3c 2f 74 e Table Tree.</t
05a0: 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 73 72 63 d>..<td><img src
05b0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
05c0: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 ia-gis.it/gaia-s
05d0: 69 6e 73 2f 67 75 69 2d 70 6f 73 74 67 72 65 73 ins/gui-postgres
05e0: 2f 67 75 69 33 2e 70 6e 67 22 20 61 6c 74 3d 22 /gui3.png" alt="
05f0: 63 6f 6e 6e 65 63 74 69 6f 6e 20 33 22 3e 3c 2f connection 3"></
0600: 74 64 3e 0d 0a 3c 2f 74 72 3e 3c 74 72 3e 0d 0a td>..</tr><tr>..
0610: 3c 74 64 3e 3c 62 3e 34 2e 3c 2f 62 3e 20 69 6e <td><b>4.</b> in
0620: 20 61 6c 6c 20 74 68 72 65 65 20 63 61 73 65 73 all three cases
0630: 20 74 68 65 20 50 6f 73 74 67 72 65 53 51 4c 20 the PostgreSQL
0640: 63 6f 6e 6e 65 63 74 69 6f 6e 20 64 69 61 6c 6f connection dialo
0650: 67 20 77 69 6c 6c 20 61 70 70 65 61 72 2e 3c 62 g will appear.<b
0660: 72 3e 0d 0a 4a 75 73 74 20 69 6e 73 65 72 74 20 r>..Just insert
0670: 74 68 65 20 72 65 71 75 69 72 65 64 20 63 6f 6e the required con
0680: 6e 65 63 74 69 6f 6e 20 61 72 67 75 6d 65 6e 74 nection argument
0690: 73 20 61 6e 64 20 63 6f 6e 66 69 72 6d 2e 3c 62 s and confirm.<b
06a0: 72 3e 3c 62 72 3e 0d 0a 49 66 20 74 68 65 20 67 r><br>..If the g
06b0: 69 76 65 6e 20 61 72 67 75 6d 65 6e 74 73 20 61 iven arguments a
06c0: 72 65 20 69 6e 76 61 6c 69 64 20 61 6e 20 65 72 re invalid an er
06d0: 72 6f 72 20 6d 65 73 73 61 67 65 20 77 69 6c 6c ror message will
06e0: 20 62 65 20 74 68 65 6e 20 64 69 73 70 6c 61 79 be then display
06f0: 65 64 2c 20 6f 74 68 72 77 69 73 65 20 74 68 65 ed, othrwise the
0700: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 77 69 6c 6c connection will
0710: 20 62 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 be immediately
0720: 65 73 74 61 62 6c 69 73 68 65 64 2e 3c 62 72 3e established.<br>
0730: 3c 62 72 3e 3c 62 72 3e 3c 68 72 3e 3c 62 72 3e <br><br><hr><br>
0740: 3c 62 72 3e 3c 62 72 3e 0d 0a 49 66 20 79 6f 75 <br><br>..If you
0750: 20 61 72 65 20 61 74 74 65 6d 70 74 69 6e 67 20 are attempting
0760: 74 6f 20 63 6f 6e 6e 65 63 74 20 61 20 72 65 6d to connect a rem
0770: 6f 74 65 20 73 65 72 76 65 72 2c 20 79 6f 75 20 ote server, you
0780: 63 6f 75 6c 64 20 70 72 6f 62 61 62 6c 79 20 66 could probably f
0790: 69 6e 64 20 75 73 65 66 75 6c 20 72 65 61 64 69 ind useful readi
07a0: 6e 67 20 66 69 72 73 74 20 74 68 65 20 74 75 74 ng first the tut
07b0: 6f 72 69 61 6c 20 61 62 6f 75 74 20 3c 61 20 68 orial about <a h
07c0: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 ref="https://www
07d0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 .gaia-gis.it/fos
07e0: 73 69 6c 2f 76 69 72 74 75 61 6c 70 67 2f 77 69 sil/virtualpg/wi
07f0: 6b 69 3f 6e 61 6d 65 3d 70 6f 72 74 2d 66 6f 72 ki?name=port-for
0800: 77 61 72 64 69 6e 67 22 3e 53 53 48 20 74 75 6e warding">SSH tun
0810: 6e 65 6c 69 6e 67 20 61 6e 64 20 50 6f 72 74 20 neling and Port
0820: 46 6f 72 77 61 72 64 69 6e 67 20 2f 20 3c 2f 61 Forwarding / </a
0830: 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 ></td>..<td><img
0840: 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 src="https://ww
0850: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 w.gaia-gis.it/ga
0860: 69 61 2d 73 69 6e 73 2f 67 75 69 2d 70 6f 73 74 ia-sins/gui-post
0870: 67 72 65 73 2f 67 75 69 33 2e 70 6e 67 22 20 61 gres/gui3.png" a
0880: 6c 74 3d 22 63 6f 6e 6e 65 63 74 69 6f 6e 20 33 lt="connection 3
0890: 22 3e 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a "></td>..</tr>..
08a0: 3c 2f 74 61 62 6c 65 3e 0d 0a 0d 0a 0d 0a 42 61 </table>......Ba
08b0: 63 6b 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 ck to <a href="h
08c0: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d ttps://www.gaia-
08d0: 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 73 70 gis.it/fossil/sp
08e0: 61 74 69 61 6c 69 74 65 5f 67 75 69 2f 77 69 6b atialite_gui/wik
08f0: 69 3f 6e 61 6d 65 3d 73 70 61 74 69 61 6c 69 74 i?name=spatialit
0900: 65 2d 67 75 69 22 3e 6d 61 69 6e 20 57 69 6b 69 e-gui">main Wiki
0910: 20 70 61 67 65 3c 2f 61 3e 0a 5a 20 33 38 39 31 page</a>.Z 3891
0920: 36 31 32 62 65 31 66 66 39 65 36 38 38 64 39 39 612be1ff9e688d99
0930: 35 37 34 31 34 61 39 66 31 38 64 35 0a 57414a9f18d5.