Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Dave Page
Thanks - patch applied!

On Thu, Apr 14, 2016 at 2:31 PM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> Sorry my bad I misinterpreted, I thought you meant rename/changing schema
> only.
>
> PFA updated patch.
>
> And For Dialog not closing issue is generic and I have already created
> internal ticket for it.
>
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Apr 14, 2016 at 6:44 PM, Dave Page  wrote:
>>
>> Hi,
>>
>> The first issue is only partially fixed - it'll still let me try to
>> rename a shell type.
>>
>> Also, I notice when hitting Save on my changes, they're applied (if
>> they're valid), but the dialogue doesn't close. I see the following in
>> the browser console:
>>
>> Uncaught TypeError: Cannot read property 'sessChanged' of
>> null(anonymous function) @ datamodel.js:333
>> _.each._.forEach @ underscore.js:153
>> pgBrowser.DataModel.Backbone.Model.extend.toJSON @ datamodel.js:322
>> (anonymous function) @ node.js:850
>> jQuery.event.dispatch @ jquery-1.11.2.js:4665
>> elemData.handle @ jquery-1.11.2.js:4333
>>
>> On Thu, Apr 14, 2016 at 1:57 PM, Murtuza Zabuawala
>>  wrote:
>> > Hi Dave,
>> >
>> > PFA patch to fixed given issues.
>> >
>> >
>> > --
>> > Regards,
>> > Murtuza Zabuawala
>> > EnterpriseDB: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>> >
>> > On Thu, Apr 14, 2016 at 5:11 PM, Dave Page  wrote:
>> >>
>> >> Thanks - patch applied. Unfortunately there are 3 more minor issues
>> >> for you to fix:
>> >>
>> >> - Renaming or changing the schema for a shell type should not be
>> >> allowed.
>> >>
>> > Done
>> >>
>> >> - I'm allowed to try to add ACL entries or security labels to an
>> >> existing shell type. This should be disallowed.
>> >>
>> > Done
>> >>
>> >> - Changing the schema on a (non-shell) type doesn't work - the type
>> >> name is omitted, e.g.
>> >>
>> > Done
>> >>
>> >> ALTER TYPE pem
>> >> SET SCHEMA pemhistory;
>> >>
>> >> Which should be:
>> >>
>> >> ALTER TYPE pem.foo
>> >> SET SCHEMA pemhistory;
>> >>
>> >> On Thu, Apr 14, 2016 at 8:36 AM, Murtuza Zabuawala
>> >>  wrote:
>> >> > Hi Dave,
>> >> >
>> >> > PFA updated patch which will fix mentioned issues.
>> >> >
>> >> > Hopefully the last one :-)
>> >> >
>> >> >
>> >> > --
>> >> > Regards,
>> >> > Murtuza Zabuawala
>> >> > EnterpriseDB: http://www.enterprisedb.com
>> >> > The Enterprise PostgreSQL Company
>> >> >
>> >> > On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> I'm seeing some more issues now, some related to new functionality:
>> >> >>
>> >> >> - Please don't include the descriptive header for shell types in
>> >> >> create.sql.
>> >> >
>> >> > Done
>> >> >>
>> >> >>
>> >> >> - Shell types can (and should) have owner/comments set if specified.
>> >> >>
>> >> > Done
>> >> >>
>> >> >> - The Type dropdown should just say "Shell" for shell types (no
>> >> >> additional text).
>> >> >>
>> >> > Done
>> >> >>
>> >> >> - Privileges and labels grids should be disabled for shell types.
>> >> >>
>> >> > Done
>> >> >>
>> >> >> - When I select External type, I see the following error (and a 500
>> >> >> error in the browser console):
>> >> >>
>> >> >> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
>> >> >> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
>> >> >> Error Message:ERROR:  syntax error at or near "and"
>> >> >> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname)
>> >> >> !=...
>> >> >>
>> >> > Done
>> >> >>
>> >> >> - Length/Precision and scale are not shown in the dialogue for
>> >> >> existing
>> >> >> types.
>> >> >>
>> >> > Done (PFA screenshot)
>> >> >
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >>
>> >> >> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
>> >> >>  wrote:
>> >> >> > Hi Dave,
>> >> >> >
>> >> >> > Please find updated patches to fix all the mentioned issues.
>> >> >> >
>> >> >> > There are three patches,
>> >> >> > 1) One for fixing rendering issue when selecting type
>> >> >> > 2) Added utility function to fetch full type name with length &
>> >> >> > precision
>> >> >> > 3) Added new Shell type for External types.
>> >> >> >
>> >> >> >
>> >> >> > Regards,
>> >> >> > Murtuza
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Regards,
>> >> >> > Murtuza Zabuawala
>> >> >> > EnterpriseDB: http://www.enterprisedb.com
>> >> >> > The Enterprise PostgreSQL Company
>> >> >> >
>> >> >> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page 
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Hi Murtuza
>> >> >> >>
>> >> >> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page 
>> >> >> >> wrote:
>> >> >> >> > Hi
>> >> >> >> >
>> >> >> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>> >> >> >> > 

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Murtuza Zabuawala
Hi Dave,

Sorry my bad I misinterpreted, I thought you meant rename/changing schema
only.

PFA updated patch.

And For Dialog not closing issue is generic and I have already created
internal ticket for it.



--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Apr 14, 2016 at 6:44 PM, Dave Page  wrote:

> Hi,
>
> The first issue is only partially fixed - it'll still let me try to
> rename a shell type.
>
> Also, I notice when hitting Save on my changes, they're applied (if
> they're valid), but the dialogue doesn't close. I see the following in
> the browser console:
>
> Uncaught TypeError: Cannot read property 'sessChanged' of
> null(anonymous function) @ datamodel.js:333
> _.each._.forEach @ underscore.js:153
> pgBrowser.DataModel.Backbone.Model.extend.toJSON @ datamodel.js:322
> (anonymous function) @ node.js:850
> jQuery.event.dispatch @ jquery-1.11.2.js:4665
> elemData.handle @ jquery-1.11.2.js:4333
>
> On Thu, Apr 14, 2016 at 1:57 PM, Murtuza Zabuawala
>  wrote:
> > Hi Dave,
> >
> > PFA patch to fixed given issues.
> >
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > On Thu, Apr 14, 2016 at 5:11 PM, Dave Page  wrote:
> >>
> >> Thanks - patch applied. Unfortunately there are 3 more minor issues
> >> for you to fix:
> >>
> >> - Renaming or changing the schema for a shell type should not be
> allowed.
> >>
> > Done
> >>
> >> - I'm allowed to try to add ACL entries or security labels to an
> >> existing shell type. This should be disallowed.
> >>
> > Done
> >>
> >> - Changing the schema on a (non-shell) type doesn't work - the type
> >> name is omitted, e.g.
> >>
> > Done
> >>
> >> ALTER TYPE pem
> >> SET SCHEMA pemhistory;
> >>
> >> Which should be:
> >>
> >> ALTER TYPE pem.foo
> >> SET SCHEMA pemhistory;
> >>
> >> On Thu, Apr 14, 2016 at 8:36 AM, Murtuza Zabuawala
> >>  wrote:
> >> > Hi Dave,
> >> >
> >> > PFA updated patch which will fix mentioned issues.
> >> >
> >> > Hopefully the last one :-)
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > Murtuza Zabuawala
> >> > EnterpriseDB: http://www.enterprisedb.com
> >> > The Enterprise PostgreSQL Company
> >> >
> >> > On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:
> >> >>
> >> >> Hi
> >> >>
> >> >> I'm seeing some more issues now, some related to new functionality:
> >> >>
> >> >> - Please don't include the descriptive header for shell types in
> >> >> create.sql.
> >> >
> >> > Done
> >> >>
> >> >>
> >> >> - Shell types can (and should) have owner/comments set if specified.
> >> >>
> >> > Done
> >> >>
> >> >> - The Type dropdown should just say "Shell" for shell types (no
> >> >> additional text).
> >> >>
> >> > Done
> >> >>
> >> >> - Privileges and labels grids should be disabled for shell types.
> >> >>
> >> > Done
> >> >>
> >> >> - When I select External type, I see the following error (and a 500
> >> >> error in the browser console):
> >> >>
> >> >> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
> >> >> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
> >> >> Error Message:ERROR:  syntax error at or near "and"
> >> >> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname)
> !=...
> >> >>
> >> > Done
> >> >>
> >> >> - Length/Precision and scale are not shown in the dialogue for
> existing
> >> >> types.
> >> >>
> >> > Done (PFA screenshot)
> >> >
> >> >>
> >> >> Thanks.
> >> >>
> >> >>
> >> >> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
> >> >>  wrote:
> >> >> > Hi Dave,
> >> >> >
> >> >> > Please find updated patches to fix all the mentioned issues.
> >> >> >
> >> >> > There are three patches,
> >> >> > 1) One for fixing rendering issue when selecting type
> >> >> > 2) Added utility function to fetch full type name with length &
> >> >> > precision
> >> >> > 3) Added new Shell type for External types.
> >> >> >
> >> >> >
> >> >> > Regards,
> >> >> > Murtuza
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Regards,
> >> >> > Murtuza Zabuawala
> >> >> > EnterpriseDB: http://www.enterprisedb.com
> >> >> > The Enterprise PostgreSQL Company
> >> >> >
> >> >> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page 
> wrote:
> >> >> >>
> >> >> >> Hi Murtuza
> >> >> >>
> >> >> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page 
> >> >> >> wrote:
> >> >> >> > Hi
> >> >> >> >
> >> >> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
> >> >> >> >  wrote:
> >> >> >> >> Hi Dave,
> >> >> >> >>
> >> >> >> >> We can create new external type using below method, By running
> >> >> >> >> all
> >> >> >> >> of
> >> >> >> >> below
> >> >> >> >> queries at the same time , we can not create separate external
> >> >> >> >> type
> >> >> >> >> by
> >> 

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Dave Page
Hi,

The first issue is only partially fixed - it'll still let me try to
rename a shell type.

Also, I notice when hitting Save on my changes, they're applied (if
they're valid), but the dialogue doesn't close. I see the following in
the browser console:

Uncaught TypeError: Cannot read property 'sessChanged' of
null(anonymous function) @ datamodel.js:333
_.each._.forEach @ underscore.js:153
pgBrowser.DataModel.Backbone.Model.extend.toJSON @ datamodel.js:322
(anonymous function) @ node.js:850
jQuery.event.dispatch @ jquery-1.11.2.js:4665
elemData.handle @ jquery-1.11.2.js:4333

On Thu, Apr 14, 2016 at 1:57 PM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> PFA patch to fixed given issues.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Apr 14, 2016 at 5:11 PM, Dave Page  wrote:
>>
>> Thanks - patch applied. Unfortunately there are 3 more minor issues
>> for you to fix:
>>
>> - Renaming or changing the schema for a shell type should not be allowed.
>>
> Done
>>
>> - I'm allowed to try to add ACL entries or security labels to an
>> existing shell type. This should be disallowed.
>>
> Done
>>
>> - Changing the schema on a (non-shell) type doesn't work - the type
>> name is omitted, e.g.
>>
> Done
>>
>> ALTER TYPE pem
>> SET SCHEMA pemhistory;
>>
>> Which should be:
>>
>> ALTER TYPE pem.foo
>> SET SCHEMA pemhistory;
>>
>> On Thu, Apr 14, 2016 at 8:36 AM, Murtuza Zabuawala
>>  wrote:
>> > Hi Dave,
>> >
>> > PFA updated patch which will fix mentioned issues.
>> >
>> > Hopefully the last one :-)
>> >
>> >
>> > --
>> > Regards,
>> > Murtuza Zabuawala
>> > EnterpriseDB: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>> >
>> > On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:
>> >>
>> >> Hi
>> >>
>> >> I'm seeing some more issues now, some related to new functionality:
>> >>
>> >> - Please don't include the descriptive header for shell types in
>> >> create.sql.
>> >
>> > Done
>> >>
>> >>
>> >> - Shell types can (and should) have owner/comments set if specified.
>> >>
>> > Done
>> >>
>> >> - The Type dropdown should just say "Shell" for shell types (no
>> >> additional text).
>> >>
>> > Done
>> >>
>> >> - Privileges and labels grids should be disabled for shell types.
>> >>
>> > Done
>> >>
>> >> - When I select External type, I see the following error (and a 500
>> >> error in the browser console):
>> >>
>> >> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
>> >> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
>> >> Error Message:ERROR:  syntax error at or near "and"
>> >> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...
>> >>
>> > Done
>> >>
>> >> - Length/Precision and scale are not shown in the dialogue for existing
>> >> types.
>> >>
>> > Done (PFA screenshot)
>> >
>> >>
>> >> Thanks.
>> >>
>> >>
>> >> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
>> >>  wrote:
>> >> > Hi Dave,
>> >> >
>> >> > Please find updated patches to fix all the mentioned issues.
>> >> >
>> >> > There are three patches,
>> >> > 1) One for fixing rendering issue when selecting type
>> >> > 2) Added utility function to fetch full type name with length &
>> >> > precision
>> >> > 3) Added new Shell type for External types.
>> >> >
>> >> >
>> >> > Regards,
>> >> > Murtuza
>> >> >
>> >> >
>> >> > --
>> >> > Regards,
>> >> > Murtuza Zabuawala
>> >> > EnterpriseDB: http://www.enterprisedb.com
>> >> > The Enterprise PostgreSQL Company
>> >> >
>> >> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
>> >> >>
>> >> >> Hi Murtuza
>> >> >>
>> >> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page 
>> >> >> wrote:
>> >> >> > Hi
>> >> >> >
>> >> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>> >> >> >  wrote:
>> >> >> >> Hi Dave,
>> >> >> >>
>> >> >> >> We can create new external type using below method, By running
>> >> >> >> all
>> >> >> >> of
>> >> >> >> below
>> >> >> >> queries at the same time , we can not create separate external
>> >> >> >> type
>> >> >> >> by
>> >> >> >> only
>> >> >> >> using create type statement.
>> >> >> >>
>> >> >> >> So as per my discussion with Ashesh, We should not allow user to
>> >> >> >> create
>> >> >> >> external type in pgAdmin4 but only show definition in edit mode.
>> >> >> >
>> >> >> > Hmm, would it not make sense to allow the user to create the shell
>> >> >> > type as well (perhaps, with a new type of "SHELL")? Then they
>> >> >> > could
>> >> >> > do
>> >> >> > what is needed (and that should be easy, as it's just CREATE TYPE
>> >> >> > foo;)
>> >> >> >
>> >> >> > For example:
>> >> >> >
>> >> >> > CREATE TYPE box;
>> >> >> >
>> >> >> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
>> >> >> > CREATE 

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Murtuza Zabuawala
Hi Dave,

PFA patch to fixed given issues.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Apr 14, 2016 at 5:11 PM, Dave Page  wrote:

> Thanks - patch applied. Unfortunately there are 3 more minor issues
> for you to fix:
>
> - Renaming or changing the schema for a shell type should not be allowed.
>
> Done

> - I'm allowed to try to add ACL entries or security labels to an
> existing shell type. This should be disallowed.
>
> Done

> - Changing the schema on a (non-shell) type doesn't work - the type
> name is omitted, e.g.
>
> Done

> ALTER TYPE pem
> SET SCHEMA pemhistory;
>
> Which should be:
>
> ALTER TYPE pem.foo
> SET SCHEMA pemhistory;
>
> On Thu, Apr 14, 2016 at 8:36 AM, Murtuza Zabuawala
>  wrote:
> > Hi Dave,
> >
> > PFA updated patch which will fix mentioned issues.
> >
> > Hopefully the last one :-)
> >
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:
> >>
> >> Hi
> >>
> >> I'm seeing some more issues now, some related to new functionality:
> >>
> >> - Please don't include the descriptive header for shell types in
> >> create.sql.
> >
> > Done
> >>
> >>
> >> - Shell types can (and should) have owner/comments set if specified.
> >>
> > Done
> >>
> >> - The Type dropdown should just say "Shell" for shell types (no
> >> additional text).
> >>
> > Done
> >>
> >> - Privileges and labels grids should be disabled for shell types.
> >>
> > Done
> >>
> >> - When I select External type, I see the following error (and a 500
> >> error in the browser console):
> >>
> >> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
> >> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
> >> Error Message:ERROR:  syntax error at or near "and"
> >> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...
> >>
> > Done
> >>
> >> - Length/Precision and scale are not shown in the dialogue for existing
> >> types.
> >>
> > Done (PFA screenshot)
> >
> >>
> >> Thanks.
> >>
> >>
> >> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
> >>  wrote:
> >> > Hi Dave,
> >> >
> >> > Please find updated patches to fix all the mentioned issues.
> >> >
> >> > There are three patches,
> >> > 1) One for fixing rendering issue when selecting type
> >> > 2) Added utility function to fetch full type name with length &
> >> > precision
> >> > 3) Added new Shell type for External types.
> >> >
> >> >
> >> > Regards,
> >> > Murtuza
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > Murtuza Zabuawala
> >> > EnterpriseDB: http://www.enterprisedb.com
> >> > The Enterprise PostgreSQL Company
> >> >
> >> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
> >> >>
> >> >> Hi Murtuza
> >> >>
> >> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page 
> wrote:
> >> >> > Hi
> >> >> >
> >> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
> >> >> >  wrote:
> >> >> >> Hi Dave,
> >> >> >>
> >> >> >> We can create new external type using below method, By running all
> >> >> >> of
> >> >> >> below
> >> >> >> queries at the same time , we can not create separate external
> type
> >> >> >> by
> >> >> >> only
> >> >> >> using create type statement.
> >> >> >>
> >> >> >> So as per my discussion with Ashesh, We should not allow user to
> >> >> >> create
> >> >> >> external type in pgAdmin4 but only show definition in edit mode.
> >> >> >
> >> >> > Hmm, would it not make sense to allow the user to create the shell
> >> >> > type as well (perhaps, with a new type of "SHELL")? Then they could
> >> >> > do
> >> >> > what is needed (and that should be easy, as it's just CREATE TYPE
> >> >> > foo;)
> >> >> >
> >> >> > For example:
> >> >> >
> >> >> > CREATE TYPE box;
> >> >> >
> >> >> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
> >> >> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
> >> >> >
> >> >> > CREATE TYPE box (
> >> >> > INTERNALLENGTH = 16,
> >> >> > INPUT = my_box_in_function,
> >> >> > OUTPUT = my_box_out_function
> >> >> > );
> >> >> >
> >> >> > CREATE TABLE myboxes (
> >> >> > id integer,
> >> >> > description box
> >> >> > );
> >> >>
> >> >> In the interests of making progress, I've committed the most recent
> >> >> patch, with a number of minor changes most significantly, the
> Postgres
> >> >> docs and system catalogs seem to have different ideas about what to
> >> >> call length, precision and scale. pgAdmin 3 followed the catalogs and
> >> >> used length and precision, however I've updated pgAdmin 4 to use
> >> >> "Length/precision" and "Scale" which is inline with the Postgres
> docs.
> >> >> That's only in the UI though - the code follows the catalogs.
> 

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Dave Page
Thanks - patch applied. Unfortunately there are 3 more minor issues
for you to fix:

- Renaming or changing the schema for a shell type should not be allowed.

- I'm allowed to try to add ACL entries or security labels to an
existing shell type. This should be disallowed.

- Changing the schema on a (non-shell) type doesn't work - the type
name is omitted, e.g.

ALTER TYPE pem
SET SCHEMA pemhistory;

Which should be:

ALTER TYPE pem.foo
SET SCHEMA pemhistory;

On Thu, Apr 14, 2016 at 8:36 AM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> PFA updated patch which will fix mentioned issues.
>
> Hopefully the last one :-)
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:
>>
>> Hi
>>
>> I'm seeing some more issues now, some related to new functionality:
>>
>> - Please don't include the descriptive header for shell types in
>> create.sql.
>
> Done
>>
>>
>> - Shell types can (and should) have owner/comments set if specified.
>>
> Done
>>
>> - The Type dropdown should just say "Shell" for shell types (no
>> additional text).
>>
> Done
>>
>> - Privileges and labels grids should be disabled for shell types.
>>
> Done
>>
>> - When I select External type, I see the following error (and a 500
>> error in the browser console):
>>
>> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
>> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
>> Error Message:ERROR:  syntax error at or near "and"
>> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...
>>
> Done
>>
>> - Length/Precision and scale are not shown in the dialogue for existing
>> types.
>>
> Done (PFA screenshot)
>
>>
>> Thanks.
>>
>>
>> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
>>  wrote:
>> > Hi Dave,
>> >
>> > Please find updated patches to fix all the mentioned issues.
>> >
>> > There are three patches,
>> > 1) One for fixing rendering issue when selecting type
>> > 2) Added utility function to fetch full type name with length &
>> > precision
>> > 3) Added new Shell type for External types.
>> >
>> >
>> > Regards,
>> > Murtuza
>> >
>> >
>> > --
>> > Regards,
>> > Murtuza Zabuawala
>> > EnterpriseDB: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>> >
>> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
>> >>
>> >> Hi Murtuza
>> >>
>> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
>> >> > Hi
>> >> >
>> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>> >> >  wrote:
>> >> >> Hi Dave,
>> >> >>
>> >> >> We can create new external type using below method, By running all
>> >> >> of
>> >> >> below
>> >> >> queries at the same time , we can not create separate external type
>> >> >> by
>> >> >> only
>> >> >> using create type statement.
>> >> >>
>> >> >> So as per my discussion with Ashesh, We should not allow user to
>> >> >> create
>> >> >> external type in pgAdmin4 but only show definition in edit mode.
>> >> >
>> >> > Hmm, would it not make sense to allow the user to create the shell
>> >> > type as well (perhaps, with a new type of "SHELL")? Then they could
>> >> > do
>> >> > what is needed (and that should be easy, as it's just CREATE TYPE
>> >> > foo;)
>> >> >
>> >> > For example:
>> >> >
>> >> > CREATE TYPE box;
>> >> >
>> >> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
>> >> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
>> >> >
>> >> > CREATE TYPE box (
>> >> > INTERNALLENGTH = 16,
>> >> > INPUT = my_box_in_function,
>> >> > OUTPUT = my_box_out_function
>> >> > );
>> >> >
>> >> > CREATE TABLE myboxes (
>> >> > id integer,
>> >> > description box
>> >> > );
>> >>
>> >> In the interests of making progress, I've committed the most recent
>> >> patch, with a number of minor changes most significantly, the Postgres
>> >> docs and system catalogs seem to have different ideas about what to
>> >> call length, precision and scale. pgAdmin 3 followed the catalogs and
>> >> used length and precision, however I've updated pgAdmin 4 to use
>> >> "Length/precision" and "Scale" which is inline with the Postgres docs.
>> >> That's only in the UI though - the code follows the catalogs.
>> >>
>> >> There are still a couple of issues - please provide fixes ASAP:
>> >>
>> >> 1) If you create a composite type that contains a sized type (e.g.
>> >> numeric(5, 4), the precision and scale are not shown if you later open
>> >> the properties dialogue, or in the reverse engineered SQL.
>> >>
>> >> E.g. what pgAdmin3 shows as:
>> >>
>> >> CREATE TYPE pem.blergh AS
>> >>(c1 text COLLATE pg_catalog."C",
>> >> c2 numeric(5));
>> >>
>> >> Is shown by pgAdmin4 as:
>> >>
>> >> CREATE TYPE pem.blergh AS
>> >> (c1 text COLLATE 

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-14 Thread Murtuza Zabuawala
Hi Dave,

PFA updated patch which will fix mentioned issues.

Hopefully the last one :-)


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Wed, Apr 13, 2016 at 6:18 PM, Dave Page  wrote:

> Hi
>
> I'm seeing some more issues now, some related to new functionality:
>
> - Please don't include the descriptive header for shell types in
> create.sql.
>
Done

>
> - Shell types can (and should) have owner/comments set if specified.
>
> Done

> - The Type dropdown should just say "Shell" for shell types (no
> additional text).
>
> Done

> - Privileges and labels grids should be disabled for shell types.
>
> Done

> - When I select External type, I see the following error (and a 500
> error in the browser console):
>
> 2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
> (execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
> Error Message:ERROR:  syntax error at or near "and"
> LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...
>
> Done

> - Length/Precision and scale are not shown in the dialogue for existing
> types.
>
> Done (PFA screenshot)


> Thanks.
>
>
> On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
>  wrote:
> > Hi Dave,
> >
> > Please find updated patches to fix all the mentioned issues.
> >
> > There are three patches,
> > 1) One for fixing rendering issue when selecting type
> > 2) Added utility function to fetch full type name with length & precision
> > 3) Added new Shell type for External types.
> >
> >
> > Regards,
> > Murtuza
> >
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
> >>
> >> Hi Murtuza
> >>
> >> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
> >> > Hi
> >> >
> >> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
> >> >  wrote:
> >> >> Hi Dave,
> >> >>
> >> >> We can create new external type using below method, By running all of
> >> >> below
> >> >> queries at the same time , we can not create separate external type
> by
> >> >> only
> >> >> using create type statement.
> >> >>
> >> >> So as per my discussion with Ashesh, We should not allow user to
> create
> >> >> external type in pgAdmin4 but only show definition in edit mode.
> >> >
> >> > Hmm, would it not make sense to allow the user to create the shell
> >> > type as well (perhaps, with a new type of "SHELL")? Then they could do
> >> > what is needed (and that should be easy, as it's just CREATE TYPE
> >> > foo;)
> >> >
> >> > For example:
> >> >
> >> > CREATE TYPE box;
> >> >
> >> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
> >> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
> >> >
> >> > CREATE TYPE box (
> >> > INTERNALLENGTH = 16,
> >> > INPUT = my_box_in_function,
> >> > OUTPUT = my_box_out_function
> >> > );
> >> >
> >> > CREATE TABLE myboxes (
> >> > id integer,
> >> > description box
> >> > );
> >>
> >> In the interests of making progress, I've committed the most recent
> >> patch, with a number of minor changes most significantly, the Postgres
> >> docs and system catalogs seem to have different ideas about what to
> >> call length, precision and scale. pgAdmin 3 followed the catalogs and
> >> used length and precision, however I've updated pgAdmin 4 to use
> >> "Length/precision" and "Scale" which is inline with the Postgres docs.
> >> That's only in the UI though - the code follows the catalogs.
> >>
> >> There are still a couple of issues - please provide fixes ASAP:
> >>
> >> 1) If you create a composite type that contains a sized type (e.g.
> >> numeric(5, 4), the precision and scale are not shown if you later open
> >> the properties dialogue, or in the reverse engineered SQL.
> >>
> >> E.g. what pgAdmin3 shows as:
> >>
> >> CREATE TYPE pem.blergh AS
> >>(c1 text COLLATE pg_catalog."C",
> >> c2 numeric(5));
> >>
> >> Is shown by pgAdmin4 as:
> >>
> >> CREATE TYPE pem.blergh AS
> >> (c1 text COLLATE pg_catalog."C", c2 numeric);
> >>
> >> (adding the \n's would be good too).
> >>
> >> 2) If you select a different type of type in create mode, the new
> >> options are shown below those for the previously selected type,
> >> instead of replacing them. Please see the attached screenshot.
> >>
> >> 3) I would still like us to support External types. I believe the
> >> simple option here is to re-add the code you had previously, and to
> >> add a new type of type called "SHELL" as discussed in my previous
> >> email above. The user would then be able to create a SHELL type, add
> >> the required functions, then come back and create the EXTERNAL type.
> >>
> >> I'll add cards to our internal kanban chart for these issues.
> >>
> >> Thanks.
> >>
> >> --
> >> Dave Page

Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-13 Thread Dave Page
Hi

I'm seeing some more issues now, some related to new functionality:

- Please don't include the descriptive header for shell types in create.sql.

- Shell types can (and should) have owner/comments set if specified.

- The Type dropdown should just say "Shell" for shell types (no
additional text).

- Privileges and labels grids should be disabled for shell types.

- When I select External type, I see the following error (and a 500
error in the browser console):

2016-04-13 13:44:49,953: ERROR pgadmin: Failed to execute query
(execute_2darray) for the server #1 - DB:pem (Query-id: 4020898):
Error Message:ERROR:  syntax error at or near "and"
LINE 2: CASE WHEN length(nspname) > 0 AND and length(nspname) !=...

- Length/Precision and scale are not shown in the dialogue for existing types.

Thanks.


On Fri, Apr 8, 2016 at 2:52 PM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> Please find updated patches to fix all the mentioned issues.
>
> There are three patches,
> 1) One for fixing rendering issue when selecting type
> 2) Added utility function to fetch full type name with length & precision
> 3) Added new Shell type for External types.
>
>
> Regards,
> Murtuza
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:
>>
>> Hi Murtuza
>>
>> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
>> > Hi
>> >
>> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>> >  wrote:
>> >> Hi Dave,
>> >>
>> >> We can create new external type using below method, By running all of
>> >> below
>> >> queries at the same time , we can not create separate external type by
>> >> only
>> >> using create type statement.
>> >>
>> >> So as per my discussion with Ashesh, We should not allow user to create
>> >> external type in pgAdmin4 but only show definition in edit mode.
>> >
>> > Hmm, would it not make sense to allow the user to create the shell
>> > type as well (perhaps, with a new type of "SHELL")? Then they could do
>> > what is needed (and that should be easy, as it's just CREATE TYPE
>> > foo;)
>> >
>> > For example:
>> >
>> > CREATE TYPE box;
>> >
>> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
>> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
>> >
>> > CREATE TYPE box (
>> > INTERNALLENGTH = 16,
>> > INPUT = my_box_in_function,
>> > OUTPUT = my_box_out_function
>> > );
>> >
>> > CREATE TABLE myboxes (
>> > id integer,
>> > description box
>> > );
>>
>> In the interests of making progress, I've committed the most recent
>> patch, with a number of minor changes most significantly, the Postgres
>> docs and system catalogs seem to have different ideas about what to
>> call length, precision and scale. pgAdmin 3 followed the catalogs and
>> used length and precision, however I've updated pgAdmin 4 to use
>> "Length/precision" and "Scale" which is inline with the Postgres docs.
>> That's only in the UI though - the code follows the catalogs.
>>
>> There are still a couple of issues - please provide fixes ASAP:
>>
>> 1) If you create a composite type that contains a sized type (e.g.
>> numeric(5, 4), the precision and scale are not shown if you later open
>> the properties dialogue, or in the reverse engineered SQL.
>>
>> E.g. what pgAdmin3 shows as:
>>
>> CREATE TYPE pem.blergh AS
>>(c1 text COLLATE pg_catalog."C",
>> c2 numeric(5));
>>
>> Is shown by pgAdmin4 as:
>>
>> CREATE TYPE pem.blergh AS
>> (c1 text COLLATE pg_catalog."C", c2 numeric);
>>
>> (adding the \n's would be good too).
>>
>> 2) If you select a different type of type in create mode, the new
>> options are shown below those for the previously selected type,
>> instead of replacing them. Please see the attached screenshot.
>>
>> 3) I would still like us to support External types. I believe the
>> simple option here is to re-add the code you had previously, and to
>> add a new type of type called "SHELL" as discussed in my previous
>> email above. The user would then be able to create a SHELL type, add
>> the required functions, then come back and create the EXTERNAL type.
>>
>> I'll add cards to our internal kanban chart for these issues.
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-08 Thread Murtuza Zabuawala
Hi Dave,

Please find updated patches to fix all the mentioned issues.

There are three patches,
1) One for fixing rendering issue when selecting type
2) Added utility function to fetch full type name with length & precision
3) Added new Shell type for External types.


Regards,
Murtuza


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Apr 7, 2016 at 5:06 PM, Dave Page  wrote:

> Hi Murtuza
>
> On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
> > Hi
> >
> > On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
> >  wrote:
> >> Hi Dave,
> >>
> >> We can create new external type using below method, By running all of
> below
> >> queries at the same time , we can not create separate external type by
> only
> >> using create type statement.
> >>
> >> So as per my discussion with Ashesh, We should not allow user to create
> >> external type in pgAdmin4 but only show definition in edit mode.
> >
> > Hmm, would it not make sense to allow the user to create the shell
> > type as well (perhaps, with a new type of "SHELL")? Then they could do
> > what is needed (and that should be easy, as it's just CREATE TYPE
> > foo;)
> >
> > For example:
> >
> > CREATE TYPE box;
> >
> > CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
> > CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
> >
> > CREATE TYPE box (
> > INTERNALLENGTH = 16,
> > INPUT = my_box_in_function,
> > OUTPUT = my_box_out_function
> > );
> >
> > CREATE TABLE myboxes (
> > id integer,
> > description box
> > );
>
> In the interests of making progress, I've committed the most recent
> patch, with a number of minor changes most significantly, the Postgres
> docs and system catalogs seem to have different ideas about what to
> call length, precision and scale. pgAdmin 3 followed the catalogs and
> used length and precision, however I've updated pgAdmin 4 to use
> "Length/precision" and "Scale" which is inline with the Postgres docs.
> That's only in the UI though - the code follows the catalogs.
>
> There are still a couple of issues - please provide fixes ASAP:
>
> 1) If you create a composite type that contains a sized type (e.g.
> numeric(5, 4), the precision and scale are not shown if you later open
> the properties dialogue, or in the reverse engineered SQL.
>
> E.g. what pgAdmin3 shows as:
>
> CREATE TYPE pem.blergh AS
>(c1 text COLLATE pg_catalog."C",
> c2 numeric(5));
>
> Is shown by pgAdmin4 as:
>
> CREATE TYPE pem.blergh AS
> (c1 text COLLATE pg_catalog."C", c2 numeric);
>
> (adding the \n's would be good too).
>
> 2) If you select a different type of type in create mode, the new
> options are shown below those for the previously selected type,
> instead of replacing them. Please see the attached screenshot.
>
> 3) I would still like us to support External types. I believe the
> simple option here is to re-add the code you had previously, and to
> add a new type of type called "SHELL" as discussed in my previous
> email above. The user would then be able to create a SHELL type, add
> the required functions, then come back and create the EXTERNAL type.
>
> I'll add cards to our internal kanban chart for these issues.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


added_fulltype_function_v1.patch
Description: Binary data


Fixed_rendering_issue.patch
Description: Binary data


updated_type_node.patch
Description: Binary data

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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-04-07 Thread Dave Page
Hi Murtuza

On Tue, Mar 22, 2016 at 9:22 AM, Dave Page  wrote:
> Hi
>
> On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
>  wrote:
>> Hi Dave,
>>
>> We can create new external type using below method, By running all of below
>> queries at the same time , we can not create separate external type by only
>> using create type statement.
>>
>> So as per my discussion with Ashesh, We should not allow user to create
>> external type in pgAdmin4 but only show definition in edit mode.
>
> Hmm, would it not make sense to allow the user to create the shell
> type as well (perhaps, with a new type of "SHELL")? Then they could do
> what is needed (and that should be easy, as it's just CREATE TYPE
> foo;)
>
> For example:
>
> CREATE TYPE box;
>
> CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
> CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;
>
> CREATE TYPE box (
> INTERNALLENGTH = 16,
> INPUT = my_box_in_function,
> OUTPUT = my_box_out_function
> );
>
> CREATE TABLE myboxes (
> id integer,
> description box
> );

In the interests of making progress, I've committed the most recent
patch, with a number of minor changes most significantly, the Postgres
docs and system catalogs seem to have different ideas about what to
call length, precision and scale. pgAdmin 3 followed the catalogs and
used length and precision, however I've updated pgAdmin 4 to use
"Length/precision" and "Scale" which is inline with the Postgres docs.
That's only in the UI though - the code follows the catalogs.

There are still a couple of issues - please provide fixes ASAP:

1) If you create a composite type that contains a sized type (e.g.
numeric(5, 4), the precision and scale are not shown if you later open
the properties dialogue, or in the reverse engineered SQL.

E.g. what pgAdmin3 shows as:

CREATE TYPE pem.blergh AS
   (c1 text COLLATE pg_catalog."C",
c2 numeric(5));

Is shown by pgAdmin4 as:

CREATE TYPE pem.blergh AS
(c1 text COLLATE pg_catalog."C", c2 numeric);

(adding the \n's would be good too).

2) If you select a different type of type in create mode, the new
options are shown below those for the previously selected type,
instead of replacing them. Please see the attached screenshot.

3) I would still like us to support External types. I believe the
simple option here is to re-add the code you had previously, and to
add a new type of type called "SHELL" as discussed in my previous
email above. The user would then be able to create a SHELL type, add
the required functions, then come back and create the EXTERNAL type.

I'll add cards to our internal kanban chart for these issues.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-22 Thread Dave Page
Hi

On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> We can create new external type using below method, By running all of below
> queries at the same time , we can not create separate external type by only
> using create type statement.
>
> So as per my discussion with Ashesh, We should not allow user to create
> external type in pgAdmin4 but only show definition in edit mode.

Hmm, would it not make sense to allow the user to create the shell
type as well (perhaps, with a new type of "SHELL")? Then they could do
what is needed (and that should be easy, as it's just CREATE TYPE
foo;)

For example:

CREATE TYPE box;

CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;

CREATE TYPE box (
INTERNALLENGTH = 16,
INPUT = my_box_in_function,
OUTPUT = my_box_out_function
);

CREATE TABLE myboxes (
id integer,
description box
);


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-19 Thread Harshal Dhumal
Hi Dave,

-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Thu, Mar 17, 2016 at 4:13 PM, Dave Page  wrote:

> Hi
>
> On Thu, Mar 17, 2016 at 10:08 AM, Murtuza Zabuawala
>  wrote:
> >

> - If I click ADD to add a new member to a composite type whilst the
> > previous row is expanded, the new row is added, but the expanded panel
> > remains linked to the first row.
> >
> > - If I then click on the Edit button on the new row, I see two
> > expanded panels, neither of which is attached to their row (and
> > they're in the wrong order). I would only expect to see one panel at a
> > time.
> >
> > This is general with sub-node collection control.
> > [We will add it in TODO list]
>

I just sent a patch for this issue.


>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-19 Thread Dave Page
On Wed, Mar 16, 2016 at 1:18 PM, Ashesh Vashi  wrote:

> On Wed, Mar 16, 2016 at 6:32 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Mar 14, 2016 at 12:21 PM, Murtuza Zabuawala
>>  wrote:
>> > Hi Dave,
>> >
>> > Thank you for reviewing my patch.
>> >
>> > I have made changes according to your feedback.
>> >
>> > Please review updated patch.
>>
>> OK, I think it's in pretty good shape now. Here's what I hope are the
>> last of the review comments, mostly minor things :-)
>>
>> - I'm allowed to edit ENUM label names, but PostgreSQL doesn't support
>> that.
>>
>> - Security label fields resize in Edit mode. See recent changes by
>> Arun to fix that elsewhere.
>>
>> - When editing a type, I cannot select a Grantee on the Privileges tab.
>>
> Is the grantor same as the current user?
>
> If yes - then it is a bug, otherwise it is by design.
> Because - you can not change privileges of a grantee, when it was given by
> some other grantor.
>

This is when adding new privileges - which basically doesn't work as the
form won't validate because there is no grantee selected.


>
> But - if you delete the privileges for its grantor, it will remove
> privileges for the privileges given by it too. (which is though, we have
> not yet take care, and we will do it in later.)
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>> - When adding a composite type, I cannot type/select directly in the
>> grid, I have to expand the row.
>>
>> - If I click ADD to add a new member to a composite type whilst the
>> previous row is expanded, the new row is added, but the expanded panel
>> remains linked to the first row.
>>
>> - If I then click on the Edit button on the new row, I see two
>> expanded panels, neither of which is attached to their row (and
>> they're in the wrong order). I would only expect to see one panel at a
>> time.
>>
>> - When creating an External type, the Input, Output, Send, Receive and
>> Analyze function lists are all blank. Is this expected? I would have
>> thought there would be system functions listed as there are for Typmod
>> in/out.
>>
>> - Labels for Yes/No fields should typically end in a '?', e.g.
>> "Variable?", "Preferred?"
>>
>> - s/Prefered/Preferred
>>
>> - Why does "Range" type have a frame around it?
>>
>> - If a field is there to select/display a function, it should have
>> "function" at the end of its label, e.g. "Canonical function"
>>
>> - As above, but with type. E.g. "Element type"
>>
>> - Some of the combo boxes have hint text of "Select from the list",
>> whilst others don't. This should be consistent.
>>
>> - The colouring of "No" on the switches should be blue (see "System
>> Schema?")
>>
>> - s/Subtype/Sub-type/
>>
>> - s/SubType diff/Sub-type diff function/
>>
>> - Please remove the pre-9.1 support.
>>
>> - In def create(self, gid, sid, did, scid), ensure error messages are
>> properly pluralised, e.g. 'Composite types require at least two
>> members' or 'External types require both Input & Output conversion
>> functions.'
>>
>> - additional_features.sql is poorly formatted (lack of proper indentation)
>>
>> Thanks!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-19 Thread Dave Page
Hi

On Mon, Mar 14, 2016 at 12:21 PM, Murtuza Zabuawala
 wrote:
> Hi Dave,
>
> Thank you for reviewing my patch.
>
> I have made changes according to your feedback.
>
> Please review updated patch.

OK, I think it's in pretty good shape now. Here's what I hope are the
last of the review comments, mostly minor things :-)

- I'm allowed to edit ENUM label names, but PostgreSQL doesn't support that.

- Security label fields resize in Edit mode. See recent changes by
Arun to fix that elsewhere.

- When editing a type, I cannot select a Grantee on the Privileges tab.

- When adding a composite type, I cannot type/select directly in the
grid, I have to expand the row.

- If I click ADD to add a new member to a composite type whilst the
previous row is expanded, the new row is added, but the expanded panel
remains linked to the first row.

- If I then click on the Edit button on the new row, I see two
expanded panels, neither of which is attached to their row (and
they're in the wrong order). I would only expect to see one panel at a
time.

- When creating an External type, the Input, Output, Send, Receive and
Analyze function lists are all blank. Is this expected? I would have
thought there would be system functions listed as there are for Typmod
in/out.

- Labels for Yes/No fields should typically end in a '?', e.g.
"Variable?", "Preferred?"

- s/Prefered/Preferred

- Why does "Range" type have a frame around it?

- If a field is there to select/display a function, it should have
"function" at the end of its label, e.g. "Canonical function"

- As above, but with type. E.g. "Element type"

- Some of the combo boxes have hint text of "Select from the list",
whilst others don't. This should be consistent.

- The colouring of "No" on the switches should be blue (see "System Schema?")

- s/Subtype/Sub-type/

- s/SubType diff/Sub-type diff function/

- Please remove the pre-9.1 support.

- In def create(self, gid, sid, did, scid), ensure error messages are
properly pluralised, e.g. 'Composite types require at least two
members' or 'External types require both Input & Output conversion
functions.'

- additional_features.sql is poorly formatted (lack of proper indentation)

Thanks!

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-19 Thread Ashesh Vashi
On Wed, Mar 16, 2016 at 6:32 PM, Dave Page  wrote:

> Hi
>
> On Mon, Mar 14, 2016 at 12:21 PM, Murtuza Zabuawala
>  wrote:
> > Hi Dave,
> >
> > Thank you for reviewing my patch.
> >
> > I have made changes according to your feedback.
> >
> > Please review updated patch.
>
> OK, I think it's in pretty good shape now. Here's what I hope are the
> last of the review comments, mostly minor things :-)
>
> - I'm allowed to edit ENUM label names, but PostgreSQL doesn't support
> that.
>
> - Security label fields resize in Edit mode. See recent changes by
> Arun to fix that elsewhere.
>
> - When editing a type, I cannot select a Grantee on the Privileges tab.
>
Is the grantor same as the current user?

If yes - then it is a bug, otherwise it is by design.
Because - you can not change privileges of a grantee, when it was given by
some other grantor.

But - if you delete the privileges for its grantor, it will remove
privileges for the privileges given by it too. (which is though, we have
not yet take care, and we will do it in later.)

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
> - When adding a composite type, I cannot type/select directly in the
> grid, I have to expand the row.
>
> - If I click ADD to add a new member to a composite type whilst the
> previous row is expanded, the new row is added, but the expanded panel
> remains linked to the first row.
>
> - If I then click on the Edit button on the new row, I see two
> expanded panels, neither of which is attached to their row (and
> they're in the wrong order). I would only expect to see one panel at a
> time.
>
> - When creating an External type, the Input, Output, Send, Receive and
> Analyze function lists are all blank. Is this expected? I would have
> thought there would be system functions listed as there are for Typmod
> in/out.
>
> - Labels for Yes/No fields should typically end in a '?', e.g.
> "Variable?", "Preferred?"
>
> - s/Prefered/Preferred
>
> - Why does "Range" type have a frame around it?
>
> - If a field is there to select/display a function, it should have
> "function" at the end of its label, e.g. "Canonical function"
>
> - As above, but with type. E.g. "Element type"
>
> - Some of the combo boxes have hint text of "Select from the list",
> whilst others don't. This should be consistent.
>
> - The colouring of "No" on the switches should be blue (see "System
> Schema?")
>
> - s/Subtype/Sub-type/
>
> - s/SubType diff/Sub-type diff function/
>
> - Please remove the pre-9.1 support.
>
> - In def create(self, gid, sid, did, scid), ensure error messages are
> properly pluralised, e.g. 'Composite types require at least two
> members' or 'External types require both Input & Output conversion
> functions.'
>
> - additional_features.sql is poorly formatted (lack of proper indentation)
>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-19 Thread Dave Page
Hi

On Thu, Mar 17, 2016 at 10:08 AM, Murtuza Zabuawala
 wrote:
>
> - When editing a type, I cannot select a Grantee on the Privileges tab.
>
> This is general issue with privilege control.
> [We will add it in TODO list]

OK.

> - When adding a composite type, I cannot type/select directly in the
> grid, I have to expand the row.
>
> Because currently in Backgrid we do not have functionality like if I edit
> one cell second cell re-renders according the value of first cell,
> If we expand and select the type the other two fields (length &
> precision)are dependent on the value of type for composite types they become
> enable/disable accordingly.

That's must-have functionality. Please add a TODO for it.

> - If I click ADD to add a new member to a composite type whilst the
> previous row is expanded, the new row is added, but the expanded panel
> remains linked to the first row.
>
> - If I then click on the Edit button on the new row, I see two
> expanded panels, neither of which is attached to their row (and
> they're in the wrong order). I would only expect to see one panel at a
> time.
>
> This is general with sub-node collection control.
> [We will add it in TODO list]

OK.

> - When creating an External type, the Input, Output, Send, Receive and
> Analyze function lists are all blank. Is this expected? I would have
> thought there would be system functions listed as there are for Typmod
> in/out.
>
> Dave, I was not able to test External type functionality completely because
> it requires external type which is not inbuilt in postgres.
> Once you create that custom type using C/C++ code, it will be listed in
> those combobox by sql we are using to fetch external function types added by
> user in postgres.

I wonder if installing PostGIS would allow that testing to be done.

> - Why does "Range" type have a frame around it?
>
> So that we can make visible/hide all the control/elements related to Range
> type as whole instead having separate code for each control/element.
> That frame is because we used ‘FieldsetControl’ of backform to group all the
> elements of Range type.

Can you make it a plain div with no border/title? That would fit in
better with the existing styling, assuming the columns line up
properly.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-11 Thread Dave Page
On Tue, Mar 8, 2016 at 1:38 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to add new nodes in pgAdmin4.
> 1) Type node
> 2) Catalog objects
>
> Note: Both above nodes depended on schema/catalog node, Please apply them
> after latest patch of schema/catalog from Ashesh.
> - Type node also depends on parse_priv_function_templates.patch (which I
> sent in separate email today)

The type node seems to need quite a bit of work - please review and
test it carefully before re-submitting. There's an updated patch
attached, and some review info below:

Changed in the attached patch:

- s/Oid/OID
- Set defaults for schema and owner
- Rename the Type Defintion group to Definition.
- Moved some properties (acl, members) into the appropriate group
- s/Enumration/Enumeration

To be fixed:

- This module is derived from SchemaChildModule, so why does it still
have the backend support SQL?

- I cleaned up most of the SQL, which was improperly indented in many
places. However I have not event tried to fix up the create.sql
scripts. These need reformatting to:
  - Use 4 character indents
  - Not start a line with a comma - e.g. "  ,FOO=bar", which should be
"  FOO=bar," (obviously the commas need to trail from the line
before).

- The "Show System Objects" option is not honoured.

- The members list should be delimited with ", " not ","

- The ACL columns don't match other objects on the subnode panel -
Grantee/Granter/Privileges should be Grantee/Privileges/Granter

- Attempting to add a security label with empty values gives: SECURITY
LABEL FOR None ON TYPE foo_enum IS NULL;

- The schema is omitted from GRANT statements when creating an object, e.g.

CREATE TYPE pem.foo_enum AS ENUM
('foo', 'bar', 'whizz');

ALTER TYPE pem.foo_enumOWNER TO postgres;

COMMENT ON TYPE pem.foo_enum IS 'This is the foo enum';

GRANT ALL ON TYPE foo_enum TO pem_admin;

- Move remaining Properties display properties to the appropriate
group - e.g. ENUM labels should be in the Definition group. Only Name,
OID, Owner, Alias, System Type and Comment should be under General.

- The schema name is omitted when dropping a type, leading to: type
"foo_enum" does not exist

- The dependencies and dependents tabs don't display any data.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-10 Thread Ashesh Vashi
Committed the catalog_objects with few changes:

- Renamed to catalog_objects
- columns under it were renamed to catalog_object_column
- Some of the query were specific to PPAS moved them to specific SQL
templates.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Tue, Mar 8, 2016 at 7:08 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to add new nodes in pgAdmin4.
> 1) Type node
> 2) Catalog objects
>
> *Note:* Both above nodes depended on schema/catalog node, Please apply
> them after latest patch of schema/catalog from Ashesh.
> - Type node also depends on parse_priv_function_templates.patch (which I
> sent in separate email today)
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>