public inbox for [email protected]  
help / color / mirror / Atom feed
From: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder
Date: Fri, 6 May 2016 16:32:22 +0530
Message-ID: <CAM5-9D88Ak8v-9kMiTzwmUgv4-=VK35vxrwPkf8t9rPkBv5KkQ@mail.gmail.com> (raw)
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi,

PFA patch to fix the issue:
Unable to create extension "postgis_topology" and "postgis_tiger_geocoder",
due to wrong schema name in generated SQL query.

*For example*:

It generates following query for '*postgis_toplology*' extension:
CREATE EXTENSION *postgis_topology* SCHEMA *topology*;

which is wrong. the correct query should be:
CREATE EXTENSION *postgis_topology*;

where it fetches '*topology*' schema from table *pg_available_extensions*
and
then sets schema when extension name is selected, but it should not set
schema on name change.
It is now fixed in this patch.
Thanks Fahar for reporting.

Please review and let me know for comments.

Thanks,
Surinder Kumar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] unable_to_create_ext_with_postgis.patch (2.3K, 3-unable_to_create_ext_with_postgis.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/js/extensions.js b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/js/extensions.js
index 7ecc49f..9a7f2b4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/js/extensions.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/js/extensions.js
@@ -154,9 +154,7 @@ function($, _, S, pgAdmin, pgBrowser) {
                     'version' : '',
                     'relocatable': (
                         (!_.isNull(d.relocatable[0]) && !_.isUndefined(d.relocatable[0])) ?
-                        d.relocatable[0]: ''),
-                    'schema': ((!_.isNull(d.schema[0]) &&
-                          !_.isUndefined(d.schema[0])) ? d.schema[0]: '')
+                        d.relocatable[0]: '')
                     };
                   this.model.set(changes);
                 }
@@ -168,6 +166,28 @@ function($, _, S, pgAdmin, pgBrowser) {
             })
           },
           {
+            id: 'select_file', label: '{{ _('Select file')}}',
+            type: 'text', mode: ['properties', 'create'], control: Backform.FileControl,
+            dialog_type: 'select_file', supp_types: ['*', 'pdf', 'text', 'patch', 'py']
+          },
+          {
+            id: 'select_folder', label: '{{ _('Select folder')}}',
+            type: 'text', mode: ['properties', 'create'], control: Backform.FileControl,
+            dialog_type: 'select_folder'
+          },
+          {
+            id: 'create_file', label: '{{ _('Create')}}',
+            type: 'text', mode: ['properties', 'create'], control: Backform.FileControl,
+            extraClasses: ['browse_file_input'], dialog_type: 'create_file',
+            supp_types: ['*', 'pdf', 'text', 'py', 'zip']
+          },
+          {
+            id: 'storage_dialog', label: '{{ _('Storage manager')}}',
+            type: 'text', mode: ['properties', 'create'], control: Backform.FileControl,
+            extraClasses: ['browse_file_input'], dialog_type: 'storage_dialog',
+            supp_types: ['*', 'pdf', 'text', 'py', 'zip']
+          },
+          {
             id: 'eid', label: '{{ _('OID')}}', cell: 'string',
             type: 'text', disabled: true, mode: ['properties']
           },


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder
  In-Reply-To: <CAM5-9D88Ak8v-9kMiTzwmUgv4-=VK35vxrwPkf8t9rPkBv5KkQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox