{"id":71,"date":"2014-08-14T05:50:17","date_gmt":"2014-08-14T05:50:17","guid":{"rendered":"http:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=71"},"modified":"2015-01-06T21:37:02","modified_gmt":"2015-01-06T21:37:02","slug":"postgresqlpostgis-www-sql-designer-gvsig-iii","status":"publish","type":"post","link":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=71","title":{"rendered":"PostgreSQL\/PostGIS + WWW SQL Designer + gvSIG (III)"},"content":{"rendered":"<a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"http:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;t=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;text=Check%20this%20out%20%2F%20Mira%20esto\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"http:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;title=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/reddit.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-pinterest nolightbox\" data-provider=\"pinterest\" target=\"_blank\" rel=\"nofollow\" title=\"Pin it with Pinterest\" href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;media=&#038;description=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"pinterest\" title=\"Pin it with Pinterest\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/pinterest.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"http:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71&#038;title=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=PostgreSQL%2FPostGIS%20%2B%20WWW%20SQL%20Designer%20%2B%20gvSIG%20%28III%29&#038;body=Check%20this%20out%20%2F%20Mira%20esto:%20https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F71\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/mail.png\" \/><\/a><p><a id=\"spanish\"><\/a><br \/>\n<a href=\"#english\">[In English]<\/a><br \/>\nPara terminar con esta serie de posts, esta es mi experiencia con WWW SQL Designer:<\/p>\n<ul>\n<li>WWW SQL Designer\u00a0permite importar una BD de un servidor en el entorno de dise\u00f1o, pero no permite exportar un dise\u00f1o directamente sobre una BD en un servidor. Para importar tu dise\u00f1o en una BD, la opci\u00f3n m\u00e1s sencilla es <em>Save\/Load -&gt; Generate SQL (seleccionar el SQL apropiado para la BD que uses) -&gt; Copiar el c\u00f3digo (recomendable guardarlo en fichero) -&gt; Abrir la BD y ejecutar el SQL<\/em>.<\/li>\n<li>Estoy usando lampp, as\u00ed que eso influye en d\u00f3nde est\u00e1n instalados php y WWW SQL Designer.<\/li>\n<li>Instrucciones de instalaci\u00f3n:<\/li>\n<\/ul>\n<p>https:\/\/code.google.com\/p\/wwwsqldesigner\/wiki\/Installation<\/p>\n<ul>\n<li>Modificaciones a las instrucciones de instalaci\u00f3n:<\/li>\n<\/ul>\n<p><em>create user &#8220;sqlExample&#8221; with password &#8216;mypasswd&#8217;;<\/em><\/p>\n<p><em>grant all privileges on database &#8220;sqlDesignerExample&#8221; TO &#8220;sqlExample&#8221; with grant option;<\/em><\/p>\n<ul>\n<li>Modificaciones en fichero index.php en \/opt\/lampp\/htdocs\/wwwsqldesigner-2.7\/backend\/php-postgresql\/index.php<\/li>\n<\/ul>\n<p>\/\/ Parameters for the application database<\/p>\n<p><em>function setup_saveloadlist() {<\/em><\/p>\n<p><em>Define(&#8220;HOST_ADDR&#8221;, &#8220;localhost&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ if the database cluster is on the same server as this application use &#8216;localhost&#8217; otherwise the appropriate address (192.168.0.2 for example).<\/em><\/p>\n<p><em>Define(&#8220;PORT_NO&#8221;, &#8220;5432&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ default port is 5432. If you have or had more than one db cluster at the same time, consider ports 5433,&#8230; etc.<\/em><\/p>\n<p><em>Define(&#8220;DATABASE_NAME&#8221;, &#8220;sqlDesignerExample&#8221;); \u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;USER_NAME&#8221;, &#8220;sqlExample&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;PASSWORD&#8221;, &#8220;mypasswd&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;TABLE&#8221;, &#8220;wwwsqldesigner&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>}<\/em><\/p>\n<p>\/\/ Parameters for the database you want to import in the application<\/p>\n<p><em>function setup_import() {<\/em><\/p>\n<p><em>Define(&#8220;HOST_ADDR&#8221;, &#8220;localhost&#8221;);\u00a0\u00a0 \u00a0\/\/ if the database cluster is on the same server as this application use &#8216;localhost&#8217; otherwise the appropriate address (192.168.0.2 for example).<\/em><\/p>\n<p><em>Define(&#8220;PORT_NO&#8221;, &#8220;5432&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ default port is 5432. If you have or had more than one db cluster at the same time, consider ports 5433,&#8230; etc.<\/em><\/p>\n<p><em>Define(&#8220;DATABASE_NAME&#8221;, &#8220;mybd&#8221;);\u00a0\u00a0 \u00a0\/\/ the database you want to import<\/em><\/p>\n<p><em>Define(&#8220;USER_NAME&#8221;, &#8220;postgres&#8221;);\u00a0\u00a0 \u00a0\/\/ role having rights to read the database<\/em><\/p>\n<p><em>Define(&#8220;PASSWORD&#8221;, &#8220;mypasswd&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ password for role<\/em><\/p>\n<ul>\n<li>Para activar php<\/li>\n<\/ul>\n<p>Cambiar php.ini: <em>sudo leafpad php.ini en \/opt\/lampp\/etc\u00a0<\/em>(leafpad es el editor que yo uso, puede emplearse cualquier otro)<\/p>\n<p>La extensi\u00f3n que hay que descomentar es <em>extension=&#8221;pgsql.so&#8221;<\/em> (esa extensi\u00f3n est\u00e1 en \/opt\/lampp\/lib\/php\/extensions\/no-debug-non-zts-20121212 y \/usr\/lib\/php5\/20121212)<\/p>\n<p><a id=\"english\"><\/a><br \/>\n<a href=\"#spanish\">[En espa\u00f1ol]<\/a><br \/>\nLet&#8217;s finisht this set of posts with WWW SQL Designer:<\/p>\n<ul>\n<li>WWW SQL Designer allows to import a DB from a server into the design environment, but the other way round (exporting the design directly into the DB server) is not possible.\u00a0 For importing your design into a DB, the easiest option is <em>Save\/Load -&gt; Generate SQL (you should use the proper SQL for your DB) -&gt; Copy that code (it is a good idea to keep it in a file) -&gt; Open your DB and run that code.<\/em><\/li>\n<li>I am using lampp, so the installation path of php and\u00a0WWW SQL Designer is related to lampp.<\/li>\n<li>Installation instructions:<\/li>\n<\/ul>\n<p>https:\/\/code.google.com\/p\/wwwsqldesigner\/wiki\/Installation<\/p>\n<ul>\n<li>Some modifications to these instructions:<\/li>\n<\/ul>\n<p><em>create user &#8220;sqlExample&#8221; with password &#8216;mypasswd&#8217;;<\/em><\/p>\n<p><em>grant all privileges on database &#8220;sqlDesignerExample&#8221; TO &#8220;sqlExample&#8221; with grant option;<\/em><\/p>\n<ul>\n<li>Some modifications on file index.php at \/opt\/lampp\/htdocs\/wwwsqldesigner-2.7\/backend\/php-postgresql\/index.php<\/li>\n<\/ul>\n<p>\/\/ Parameters for the application database<\/p>\n<p><em>function setup_saveloadlist() {<\/em><\/p>\n<p><em>Define(&#8220;HOST_ADDR&#8221;, &#8220;localhost&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ if the database cluster is on the same server as this application use &#8216;localhost&#8217; otherwise the appropriate address (192.168.0.2 for example).<\/em><\/p>\n<p><em>Define(&#8220;PORT_NO&#8221;, &#8220;5432&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ default port is 5432. If you have or had more than one db cluster at the same time, consider ports 5433,&#8230; etc.<\/em><\/p>\n<p><em>Define(&#8220;DATABASE_NAME&#8221;, &#8220;sqlDesignerExample&#8221;); \u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;USER_NAME&#8221;, &#8220;sqlExample&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;PASSWORD&#8221;, &#8220;mypasswd&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>Define(&#8220;TABLE&#8221;, &#8220;wwwsqldesigner&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ leave as is<\/em><\/p>\n<p><em>}<\/em><\/p>\n<p>\/\/ Parameters for the database you want to import in the application<\/p>\n<p><em>function setup_import() {<\/em><\/p>\n<p><em>Define(&#8220;HOST_ADDR&#8221;, &#8220;localhost&#8221;);\u00a0\u00a0 \u00a0\/\/ if the database cluster is on the same server as this application use &#8216;localhost&#8217; otherwise the appropriate address (192.168.0.2 for example).<\/em><\/p>\n<p><em>Define(&#8220;PORT_NO&#8221;, &#8220;5432&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ default port is 5432. If you have or had more than one db cluster at the same time, consider ports 5433,&#8230; etc.<\/em><\/p>\n<p><em>Define(&#8220;DATABASE_NAME&#8221;, &#8220;mybd&#8221;);\u00a0\u00a0 \u00a0\/\/ the database you want to import<\/em><\/p>\n<p><em>Define(&#8220;USER_NAME&#8221;, &#8220;postgres&#8221;);\u00a0\u00a0 \u00a0\/\/ role having rights to read the database<\/em><\/p>\n<p><em>Define(&#8220;PASSWORD&#8221;, &#8220;mypasswd&#8221;);\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\/\/ password for role<\/em><\/p>\n<ul>\n<li>php activation:<\/li>\n<\/ul>\n<p>Change php.ini: <em>sudo leafpad php.ini en \/opt\/lampp\/etc\u00a0<\/em>(leafpad is my text editor, of course you can use any other)<\/p>\n<p>The extension to be uncommented is\u00a0 <em>extension=&#8221;pgsql.so&#8221;<\/em> (it can be found at \/opt\/lampp\/lib\/php\/extensions\/no-debug-non-zts-20121212 and \/usr\/lib\/php5\/20121212)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[In English] Para terminar con esta serie de posts, esta es mi experiencia con WWW SQL Designer: WWW SQL Designer\u00a0permite importar una BD de un servidor en el entorno de dise\u00f1o, pero no permite exportar un dise\u00f1o directamente sobre una BD en un servidor. Para importar tu dise\u00f1o en una BD, la opci\u00f3n m\u00e1s sencilla &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=71\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PostgreSQL\/PostGIS + WWW SQL Designer + gvSIG (III)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[12],"tags":[43,16,14,13,15,17],"_links":{"self":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/71"}],"collection":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=71"}],"version-history":[{"count":22,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}