public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder
@ 2016-05-06 11:02  Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Surinder Kumar @ 2016-05-06 11:02 UTC (permalink / raw)
  To: pgadmin-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']
           },


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder
@ 2016-05-14 10:14  Ashesh Vashi <[email protected]>
  parent: Surinder Kumar <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Ashesh Vashi @ 2016-05-14 10:14 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers

Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com;


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;

On Fri, May 6, 2016 at 4:32 PM, Surinder Kumar <
[email protected]> wrote:

> 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
>
>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-05-14 10:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 11:02 [pgAdmin4][patch]: Unable to create extension "postgis_topology" and "postgis_tiger_geocoder" installed through stack builder Surinder Kumar <[email protected]>
2016-05-14 10:14 ` Ashesh Vashi <[email protected]>

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