Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-31 Thread Ashesh Vashi
Committed - after rebased the patch.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Thu, May 26, 2016 at 4:41 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA updated patch which will also include new query given by Thom for "Of
> type" drop-down.
>
>
> Regards,
> Murtuza
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, May 26, 2016 at 4:04 PM, Thom Brown  wrote:
>
>> On 26 May 2016 at 11:20, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch for RM#1231 & RM#1237.
>>>
>>> Additionally I have shifted 'Advanced tab' after columns & constraint
>>> tab.
>>>
>>>
>>> @Thom,
>>>
>>> Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to
>>> populate "Of type" combo box as given below.
>>> I was not able to find a way to differentiate between table & composite
>>> type populating from below given query,
>>> I'll put in todo list, may be someone from community can help in future.
>>>
>>> SELECT t.oid,
>>>   quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typname
>>>   FROM pg_type t, pg_namespace n
>>> WHERE t.typtype='c' AND t.typnamespace=n.oid
>>>   AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
>>> ORDER BY typname;
>>>
>>>
>> This should work:
>>
>> SELECT c.oid,
>>   quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
>>   FROM pg_namespace n, pg_class c
>> WHERE c.relkind = 'c' AND c.relnamespace=n.oid
>>   AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
>> ORDER BY typname;
>>
>> Although, to avoid confusion, the "typname" alias should probably just be
>> "relname".
>>
>> Thom
>>
>
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-26 Thread Murtuza Zabuawala
Hi,

PFA updated patch which will also include new query given by Thom for "Of
type" drop-down.


Regards,
Murtuza


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

On Thu, May 26, 2016 at 4:04 PM, Thom Brown  wrote:

> On 26 May 2016 at 11:20, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch for RM#1231 & RM#1237.
>>
>> Additionally I have shifted 'Advanced tab' after columns & constraint tab.
>>
>>
>> @Thom,
>>
>> Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to
>> populate "Of type" combo box as given below.
>> I was not able to find a way to differentiate between table & composite
>> type populating from below given query,
>> I'll put in todo list, may be someone from community can help in future.
>>
>> SELECT t.oid,
>>   quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typname
>>   FROM pg_type t, pg_namespace n
>> WHERE t.typtype='c' AND t.typnamespace=n.oid
>>   AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
>> ORDER BY typname;
>>
>>
> This should work:
>
> SELECT c.oid,
>   quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
>   FROM pg_namespace n, pg_class c
> WHERE c.relkind = 'c' AND c.relnamespace=n.oid
>   AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
> ORDER BY typname;
>
> Although, to avoid confusion, the "typname" alias should probably just be
> "relname".
>
> Thom
>


RM_1231_1237.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] Tables node (pgAdmin4)

2016-05-26 Thread Thom Brown
On 26 May 2016 at 11:20, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for RM#1231 & RM#1237.
>
> Additionally I have shifted 'Advanced tab' after columns & constraint tab.
>
>
> @Thom,
>
> Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to
> populate "Of type" combo box as given below.
> I was not able to find a way to differentiate between table & composite
> type populating from below given query,
> I'll put in todo list, may be someone from community can help in future.
>
> SELECT t.oid,
>   quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typname
>   FROM pg_type t, pg_namespace n
> WHERE t.typtype='c' AND t.typnamespace=n.oid
>   AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
> ORDER BY typname;
>
>
This should work:

SELECT c.oid,
  quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
  FROM pg_namespace n, pg_class c
WHERE c.relkind = 'c' AND c.relnamespace=n.oid
  AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
ORDER BY typname;

Although, to avoid confusion, the "typname" alias should probably just be
"relname".

Thom


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-26 Thread Murtuza Zabuawala
Hi,

PFA patch for RM#1231 & RM#1237.

Additionally I have shifted 'Advanced tab' after columns & constraint tab.


@Thom,

Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to
populate "Of type" combo box as given below.
I was not able to find a way to differentiate between table & composite
type populating from below given query,
I'll put in todo list, may be someone from community can help in future.

SELECT t.oid,
  quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typname
  FROM pg_type t, pg_namespace n
WHERE t.typtype='c' AND t.typnamespace=n.oid
  AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
ORDER BY typname;


Regards,
Murtuza


On 25-May-2016, at 9:34 pm, Ashesh Vashi 
wrote:

Thanks.
On May 25, 2016 21:01, "Thom Brown"  wrote:

> Thanks.  I've raised all of these in tickets 1231 to 1237.
>
> Thom
>
> On 25 May 2016 at 04:23, Ashesh Vashi 
> wrote:
>
>> Hi Thom,
>>
>> Can you please create RM cases for the same, it will be easy to track
>> those issues?
>> We're using "https://redmine.postgresql.org/projects/pgadmin4/; for the
>> same.
>>
>> --
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>> On Wed, May 25, 2016 at 6:42 AM, Thom Brown  wrote:
>>
>>> On 25 May 2016 at 02:00, Thom Brown  wrote:
>>> > On 25 May 2016 at 00:29, Thom Brown  wrote:
>>> >> On 24 May 2016 at 19:09, Ashesh Vashi 
>>> wrote:
>>> >>>
>>> >>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
>>> >>>  wrote:
>>> 
>>>  Hi,
>>> 
>>>  PFA patch, which will fixes below mentioned issues,
>>> >>>
>>> >>> Committed.
>>> >>
>>> >>
>>> >> In the Create Table dialog, on the Advanced tab, the "Of type"
>>> drop-down
>>> >> lists tables and composite types, but those are supposed to just be
>>> >> composite types.
>>> >>
>>> >> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE
>>> should
>>> >> be disabled when using OF.  Also, there should probably be a way of
>>> setting
>>> >> options for the columns taken from the composite type.  For example:
>>> >>
>>> >> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
>>> >> numeric);
>>> >>
>>> >> CREATE TABLE stock OF inventory (
>>> >> PRIMARY KEY (product_id),
>>> >> weight WITH OPTIONS DEFAULT 0
>>> >> );
>>> >>
>>> >> There's currently no way of doing this (neither the primary key, nor
>>> the
>>> >> default value for any columns).  It should probably automatically
>>> populate
>>> >> the columns from the composite type on the columns tab.
>>> >>
>>> >> Also, could the generated SQL have an empty line between each
>>> statement?
>>> >
>>> > Another thing I've noticed is that, when adding columns, the "Is
>>> > primary key?" column is greyed out.  Why not just make those
>>> > modifiable in that view rather than having to go into the details for
>>> > each column?
>>> >
>>> > When there's something that hasn't been set up correctly, like adding
>>> > variables for a column, but not actually selecting a variable, the SQL
>>> > pane, correctly, doesn't show an output, but the error message,
>>> > "Please provide input for variable." isn't enough to identify what
>>> > needs checking.  Could the relevant tab and field/row be
>>> > highlighted/coloured in red/bold?  This is more general, so doesn't
>>> > just apply to the create table dialog.
>>>
>>> Last issue today:
>>>
>>> When using "Of type", it's not valid to allow additional columns to be
>>> added, so those should be prevented.
>>>
>>> Thom
>>>
>>
>>
>


RM_1231_1237.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] Tables node (pgAdmin4)

2016-05-26 Thread Ashesh Vashi
Thanks.
On May 25, 2016 21:01, "Thom Brown"  wrote:

> Thanks.  I've raised all of these in tickets 1231 to 1237.
>
> Thom
>
> On 25 May 2016 at 04:23, Ashesh Vashi 
> wrote:
>
>> Hi Thom,
>>
>> Can you please create RM cases for the same, it will be easy to track
>> those issues?
>> We're using "https://redmine.postgresql.org/projects/pgadmin4/; for the
>> same.
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>> On Wed, May 25, 2016 at 6:42 AM, Thom Brown  wrote:
>>
>>> On 25 May 2016 at 02:00, Thom Brown  wrote:
>>> > On 25 May 2016 at 00:29, Thom Brown  wrote:
>>> >> On 24 May 2016 at 19:09, Ashesh Vashi 
>>> wrote:
>>> >>>
>>> >>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
>>> >>>  wrote:
>>> 
>>>  Hi,
>>> 
>>>  PFA patch, which will fixes below mentioned issues,
>>> >>>
>>> >>> Committed.
>>> >>
>>> >>
>>> >> In the Create Table dialog, on the Advanced tab, the "Of type"
>>> drop-down
>>> >> lists tables and composite types, but those are supposed to just be
>>> >> composite types.
>>> >>
>>> >> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE
>>> should
>>> >> be disabled when using OF.  Also, there should probably be a way of
>>> setting
>>> >> options for the columns taken from the composite type.  For example:
>>> >>
>>> >> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
>>> >> numeric);
>>> >>
>>> >> CREATE TABLE stock OF inventory (
>>> >> PRIMARY KEY (product_id),
>>> >> weight WITH OPTIONS DEFAULT 0
>>> >> );
>>> >>
>>> >> There's currently no way of doing this (neither the primary key, nor
>>> the
>>> >> default value for any columns).  It should probably automatically
>>> populate
>>> >> the columns from the composite type on the columns tab.
>>> >>
>>> >> Also, could the generated SQL have an empty line between each
>>> statement?
>>> >
>>> > Another thing I've noticed is that, when adding columns, the "Is
>>> > primary key?" column is greyed out.  Why not just make those
>>> > modifiable in that view rather than having to go into the details for
>>> > each column?
>>> >
>>> > When there's something that hasn't been set up correctly, like adding
>>> > variables for a column, but not actually selecting a variable, the SQL
>>> > pane, correctly, doesn't show an output, but the error message,
>>> > "Please provide input for variable." isn't enough to identify what
>>> > needs checking.  Could the relevant tab and field/row be
>>> > highlighted/coloured in red/bold?  This is more general, so doesn't
>>> > just apply to the create table dialog.
>>>
>>> Last issue today:
>>>
>>> When using "Of type", it's not valid to allow additional columns to be
>>> added, so those should be prevented.
>>>
>>> Thom
>>>
>>
>>
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-25 Thread Thom Brown
Thanks.  I've raised all of these in tickets 1231 to 1237.

Thom

On 25 May 2016 at 04:23, Ashesh Vashi  wrote:

> Hi Thom,
>
> Can you please create RM cases for the same, it will be easy to track
> those issues?
> We're using "https://redmine.postgresql.org/projects/pgadmin4/; for the
> same.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
> On Wed, May 25, 2016 at 6:42 AM, Thom Brown  wrote:
>
>> On 25 May 2016 at 02:00, Thom Brown  wrote:
>> > On 25 May 2016 at 00:29, Thom Brown  wrote:
>> >> On 24 May 2016 at 19:09, Ashesh Vashi 
>> wrote:
>> >>>
>> >>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
>> >>>  wrote:
>> 
>>  Hi,
>> 
>>  PFA patch, which will fixes below mentioned issues,
>> >>>
>> >>> Committed.
>> >>
>> >>
>> >> In the Create Table dialog, on the Advanced tab, the "Of type"
>> drop-down
>> >> lists tables and composite types, but those are supposed to just be
>> >> composite types.
>> >>
>> >> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE
>> should
>> >> be disabled when using OF.  Also, there should probably be a way of
>> setting
>> >> options for the columns taken from the composite type.  For example:
>> >>
>> >> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
>> >> numeric);
>> >>
>> >> CREATE TABLE stock OF inventory (
>> >> PRIMARY KEY (product_id),
>> >> weight WITH OPTIONS DEFAULT 0
>> >> );
>> >>
>> >> There's currently no way of doing this (neither the primary key, nor
>> the
>> >> default value for any columns).  It should probably automatically
>> populate
>> >> the columns from the composite type on the columns tab.
>> >>
>> >> Also, could the generated SQL have an empty line between each
>> statement?
>> >
>> > Another thing I've noticed is that, when adding columns, the "Is
>> > primary key?" column is greyed out.  Why not just make those
>> > modifiable in that view rather than having to go into the details for
>> > each column?
>> >
>> > When there's something that hasn't been set up correctly, like adding
>> > variables for a column, but not actually selecting a variable, the SQL
>> > pane, correctly, doesn't show an output, but the error message,
>> > "Please provide input for variable." isn't enough to identify what
>> > needs checking.  Could the relevant tab and field/row be
>> > highlighted/coloured in red/bold?  This is more general, so doesn't
>> > just apply to the create table dialog.
>>
>> Last issue today:
>>
>> When using "Of type", it's not valid to allow additional columns to be
>> added, so those should be prevented.
>>
>> Thom
>>
>
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-24 Thread Ashesh Vashi
Hi Thom,

Can you please create RM cases for the same, it will be easy to track those
issues?
We're using "https://redmine.postgresql.org/projects/pgadmin4/; for the
same.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Wed, May 25, 2016 at 6:42 AM, Thom Brown  wrote:

> On 25 May 2016 at 02:00, Thom Brown  wrote:
> > On 25 May 2016 at 00:29, Thom Brown  wrote:
> >> On 24 May 2016 at 19:09, Ashesh Vashi 
> wrote:
> >>>
> >>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
> >>>  wrote:
> 
>  Hi,
> 
>  PFA patch, which will fixes below mentioned issues,
> >>>
> >>> Committed.
> >>
> >>
> >> In the Create Table dialog, on the Advanced tab, the "Of type" drop-down
> >> lists tables and composite types, but those are supposed to just be
> >> composite types.
> >>
> >> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE
> should
> >> be disabled when using OF.  Also, there should probably be a way of
> setting
> >> options for the columns taken from the composite type.  For example:
> >>
> >> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
> >> numeric);
> >>
> >> CREATE TABLE stock OF inventory (
> >> PRIMARY KEY (product_id),
> >> weight WITH OPTIONS DEFAULT 0
> >> );
> >>
> >> There's currently no way of doing this (neither the primary key, nor the
> >> default value for any columns).  It should probably automatically
> populate
> >> the columns from the composite type on the columns tab.
> >>
> >> Also, could the generated SQL have an empty line between each statement?
> >
> > Another thing I've noticed is that, when adding columns, the "Is
> > primary key?" column is greyed out.  Why not just make those
> > modifiable in that view rather than having to go into the details for
> > each column?
> >
> > When there's something that hasn't been set up correctly, like adding
> > variables for a column, but not actually selecting a variable, the SQL
> > pane, correctly, doesn't show an output, but the error message,
> > "Please provide input for variable." isn't enough to identify what
> > needs checking.  Could the relevant tab and field/row be
> > highlighted/coloured in red/bold?  This is more general, so doesn't
> > just apply to the create table dialog.
>
> Last issue today:
>
> When using "Of type", it's not valid to allow additional columns to be
> added, so those should be prevented.
>
> Thom
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-24 Thread Thom Brown
On 25 May 2016 at 02:00, Thom Brown  wrote:
> On 25 May 2016 at 00:29, Thom Brown  wrote:
>> On 24 May 2016 at 19:09, Ashesh Vashi  wrote:
>>>
>>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
>>>  wrote:

 Hi,

 PFA patch, which will fixes below mentioned issues,
>>>
>>> Committed.
>>
>>
>> In the Create Table dialog, on the Advanced tab, the "Of type" drop-down
>> lists tables and composite types, but those are supposed to just be
>> composite types.
>>
>> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE should
>> be disabled when using OF.  Also, there should probably be a way of setting
>> options for the columns taken from the composite type.  For example:
>>
>> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
>> numeric);
>>
>> CREATE TABLE stock OF inventory (
>> PRIMARY KEY (product_id),
>> weight WITH OPTIONS DEFAULT 0
>> );
>>
>> There's currently no way of doing this (neither the primary key, nor the
>> default value for any columns).  It should probably automatically populate
>> the columns from the composite type on the columns tab.
>>
>> Also, could the generated SQL have an empty line between each statement?
>
> Another thing I've noticed is that, when adding columns, the "Is
> primary key?" column is greyed out.  Why not just make those
> modifiable in that view rather than having to go into the details for
> each column?
>
> When there's something that hasn't been set up correctly, like adding
> variables for a column, but not actually selecting a variable, the SQL
> pane, correctly, doesn't show an output, but the error message,
> "Please provide input for variable." isn't enough to identify what
> needs checking.  Could the relevant tab and field/row be
> highlighted/coloured in red/bold?  This is more general, so doesn't
> just apply to the create table dialog.

Last issue today:

When using "Of type", it's not valid to allow additional columns to be
added, so those should be prevented.

Thom


-- 
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] Tables node (pgAdmin4)

2016-05-24 Thread Thom Brown
On 25 May 2016 at 00:29, Thom Brown  wrote:
> On 24 May 2016 at 19:09, Ashesh Vashi  wrote:
>>
>> On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala
>>  wrote:
>>>
>>> Hi,
>>>
>>> PFA patch, which will fixes below mentioned issues,
>>
>> Committed.
>
>
> In the Create Table dialog, on the Advanced tab, the "Of type" drop-down
> lists tables and composite types, but those are supposed to just be
> composite types.
>
> Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE should
> be disabled when using OF.  Also, there should probably be a way of setting
> options for the columns taken from the composite type.  For example:
>
> CREATE TYPE inventory AS (product_id bigint, product_name text, weight
> numeric);
>
> CREATE TABLE stock OF inventory (
> PRIMARY KEY (product_id),
> weight WITH OPTIONS DEFAULT 0
> );
>
> There's currently no way of doing this (neither the primary key, nor the
> default value for any columns).  It should probably automatically populate
> the columns from the composite type on the columns tab.
>
> Also, could the generated SQL have an empty line between each statement?

Another thing I've noticed is that, when adding columns, the "Is
primary key?" column is greyed out.  Why not just make those
modifiable in that view rather than having to go into the details for
each column?

When there's something that hasn't been set up correctly, like adding
variables for a column, but not actually selecting a variable, the SQL
pane, correctly, doesn't show an output, but the error message,
"Please provide input for variable." isn't enough to identify what
needs checking.  Could the relevant tab and field/row be
highlighted/coloured in red/bold?  This is more general, so doesn't
just apply to the create table dialog.

Thom


-- 
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] Tables node (pgAdmin4)

2016-05-24 Thread Ashesh Vashi
On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch, which will fixes below mentioned issues,
>
Committed.

>
> - Fixed all the review comments given by Dave on tables & its child nodes.
>
Can you please list down, what has not yet been taken care in the review
comments?

>
> *Additional enhancements*
> - In Index node, We have updated the way columns were added,
>   earlier it was using subnode control now we can insert/update
>   values in-place using DepsCell functionality
>
> - In Type node, We have updated the way Composite types were added,
>   earlier it was using subnode control now we can insert/update
>   values in-place using DepsCell functionality
>
> - In Constraints nodes, Updated error messages handling earlier it was
>   throwing error when we open create dialog and no input has been
>   provided by user.
>
>
> *Affected nodes by this patch:*
>
>
>1. Table
>2. Column
>3. Check constraint
>4. Exclusion constraint
>5. Foreign key
>6. Primary key
>7. Unique
>8. Index
>9. Trigger
>10. Type
>11. Materialized view
>
> --

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Sat, May 21, 2016 at 2:45 PM, Dave Page  wrote:
>
>> I think that makes sense, yes.
>>
>> Sent from my iPad
>>
>> On 21 May 2016, at 04:12, Ashesh Vashi 
>> wrote:
>>
>>
>> On Sat, May 21, 2016 at 12:01 AM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> I just started to take a look at the table dialogue and friends. Here
>>> are a few issues that we need to address - please take care of them:
>>>
>>> 1) Move columns to their own tab. Vertical scrolling is bad.
>>>
>> Should the 'inherit from table' part of columns tab?
>>
>>>
>>> 2) Similarly, move constraints to their own tab.
>>>
>>> 3) Ensure all labels only have a capital letter on the first word,
>>> except if following words are keywords or acronyms, e.g.
>>>
>>>   With default values?
>>>   Has OIDs?
>>>
>>> 4) s/System tabel?/System table?
>>>
>>> 5) Error messages on fields should not be shown unless the field loses
>>> focus and has an error (see Create Table)
>>>
>>> 6) The sections on the Properties view are not as they should be. As
>>> I've pointed out before, the "General" section should have a limited subset
>>> of information, e.g. name, oid, owner, tablespace, comment and "is system?"
>>> Other properties should be in other appropriate sections.
>>>
>>> 7) Variables grids should not be on the Security tab (as also mentioned
>>> previously).
>>>
>>> 8) Field labels that imply a question (e.g. usually those with a Yes/No
>>> switch for input) should end in a ? - e.g. "Deferrable?"
>>>
>>> 9) On the Trigger dialogue, "Fires" and following controls should move
>>> to a new tab.
>>>
>>> 10) On the MV dialogue, VACUUM settings should be on their own tab, as
>>> on the Table dialogue.
>>>
>>> 11) Privileges controls on the Properties lists should be in a
>>> "Security" group, not "General"
>>>
>>> I think there are a couple of basic principles to follow here:
>>>
>>> - Make properties lists and dialogues consistent with existing ones,
>>> from control grouping right down to spelling and case of labels.
>>>
>>> - Dialogs should never need vertical scrolling by default (e.g. for a
>>> new object with no columns/constraints/whatever yet defined). If you need
>>> to scroll, then things should be moved to a new tab, grouped as appropriate.
>>>
>>> Thanks.
>>>
>>> On Fri, May 20, 2016 at 7:57 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Thanks - Committed with minor changes.

 On Thu, May 19, 2016 at 10:47 PM, Harshal Dhumal <
 harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA updated patch for table and all it's child nodes (Version 9). This
> patch does not depend on any of existing table node patch.
>
> Major change in this patch: Unlike pgAdmin3 now in table create mode
> any constraint(s) created (but not saved) will listen to table column
> changes and adapt themselves accordingly.
>
> For e.g.
> In table create mode user adds column definition with name "col1" then
> adds constraint which includes column "col1". Now user changes column name
> to "col2" then constraint will listen to this change and adapt the column
> name from "col1" to "col2" in constraint definition. Also if column "col2"
> is removed then constraint will also remove the column "col2" from it's
> definition.
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-23 Thread Murtuza Zabuawala
Hi,

PFA patch, which will fixes below mentioned issues,

- Fixed all the review comments given by Dave on tables & its child nodes.

*Additional enhancements*
- In Index node, We have updated the way columns were added,
  earlier it was using subnode control now we can insert/update
  values in-place using DepsCell functionality

- In Type node, We have updated the way Composite types were added,
  earlier it was using subnode control now we can insert/update
  values in-place using DepsCell functionality

- In Constraints nodes, Updated error messages handling earlier it was
  throwing error when we open create dialog and no input has been
  provided by user.


*Affected nodes by this patch:*


   1. Table
   2. Column
   3. Check constraint
   4. Exclusion constraint
   5. Foreign key
   6. Primary key
   7. Unique
   8. Index
   9. Trigger
   10. Type
   11. Materialized view




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

On Sat, May 21, 2016 at 2:45 PM, Dave Page  wrote:

> I think that makes sense, yes.
>
> Sent from my iPad
>
> On 21 May 2016, at 04:12, Ashesh Vashi 
> wrote:
>
>
> On Sat, May 21, 2016 at 12:01 AM, Dave Page  wrote:
>
>> Hi
>>
>> I just started to take a look at the table dialogue and friends. Here are
>> a few issues that we need to address - please take care of them:
>>
>> 1) Move columns to their own tab. Vertical scrolling is bad.
>>
> Should the 'inherit from table' part of columns tab?
>
>>
>> 2) Similarly, move constraints to their own tab.
>>
>> 3) Ensure all labels only have a capital letter on the first word, except
>> if following words are keywords or acronyms, e.g.
>>
>>   With default values?
>>   Has OIDs?
>>
>> 4) s/System tabel?/System table?
>>
>> 5) Error messages on fields should not be shown unless the field loses
>> focus and has an error (see Create Table)
>>
>> 6) The sections on the Properties view are not as they should be. As I've
>> pointed out before, the "General" section should have a limited subset of
>> information, e.g. name, oid, owner, tablespace, comment and "is system?"
>> Other properties should be in other appropriate sections.
>>
>> 7) Variables grids should not be on the Security tab (as also mentioned
>> previously).
>>
>> 8) Field labels that imply a question (e.g. usually those with a Yes/No
>> switch for input) should end in a ? - e.g. "Deferrable?"
>>
>> 9) On the Trigger dialogue, "Fires" and following controls should move to
>> a new tab.
>>
>> 10) On the MV dialogue, VACUUM settings should be on their own tab, as on
>> the Table dialogue.
>>
>> 11) Privileges controls on the Properties lists should be in a "Security"
>> group, not "General"
>>
>> I think there are a couple of basic principles to follow here:
>>
>> - Make properties lists and dialogues consistent with existing ones, from
>> control grouping right down to spelling and case of labels.
>>
>> - Dialogs should never need vertical scrolling by default (e.g. for a new
>> object with no columns/constraints/whatever yet defined). If you need to
>> scroll, then things should be moved to a new tab, grouped as appropriate.
>>
>> Thanks.
>>
>> On Fri, May 20, 2016 at 7:57 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Thanks - Committed with minor changes.
>>>
>>> On Thu, May 19, 2016 at 10:47 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA updated patch for table and all it's child nodes (Version 9). This
 patch does not depend on any of existing table node patch.

 Major change in this patch: Unlike pgAdmin3 now in table create mode
 any constraint(s) created (but not saved) will listen to table column
 changes and adapt themselves accordingly.

 For e.g.
 In table create mode user adds column definition with name "col1" then
 adds constraint which includes column "col1". Now user changes column name
 to "col2" then constraint will listen to this change and adapt the column
 name from "col1" to "col2" in constraint definition. Also if column "col2"
 is removed then constraint will also remove the column "col2" from it's
 definition.


 --
 *Harshal Dhumal*
 *Software Engineer *



 EenterpriseDB 



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


>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


fixed_review_comments.patch

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-21 Thread Dave Page
I think that makes sense, yes.

Sent from my iPad

> On 21 May 2016, at 04:12, Ashesh Vashi  wrote:
> 
> 
>> On Sat, May 21, 2016 at 12:01 AM, Dave Page  wrote:
>> Hi
>> 
>> I just started to take a look at the table dialogue and friends. Here are a 
>> few issues that we need to address - please take care of them:
>> 
>> 1) Move columns to their own tab. Vertical scrolling is bad.
> Should the 'inherit from table' part of columns tab? 
>> 
>> 2) Similarly, move constraints to their own tab.
>> 
>> 3) Ensure all labels only have a capital letter on the first word, except if 
>> following words are keywords or acronyms, e.g.
>> 
>>   With default values?
>>   Has OIDs?
>>   
>> 4) s/System tabel?/System table?
>> 
>> 5) Error messages on fields should not be shown unless the field loses focus 
>> and has an error (see Create Table)
>> 
>> 6) The sections on the Properties view are not as they should be. As I've 
>> pointed out before, the "General" section should have a limited subset of 
>> information, e.g. name, oid, owner, tablespace, comment and "is system?" 
>> Other properties should be in other appropriate sections.
>> 
>> 7) Variables grids should not be on the Security tab (as also mentioned 
>> previously).
>> 
>> 8) Field labels that imply a question (e.g. usually those with a Yes/No 
>> switch for input) should end in a ? - e.g. "Deferrable?"
>> 
>> 9) On the Trigger dialogue, "Fires" and following controls should move to a 
>> new tab.
>> 
>> 10) On the MV dialogue, VACUUM settings should be on their own tab, as on 
>> the Table dialogue.
>> 
>> 11) Privileges controls on the Properties lists should be in a "Security" 
>> group, not "General"
>> 
>> I think there are a couple of basic principles to follow here:
>> 
>> - Make properties lists and dialogues consistent with existing ones, from 
>> control grouping right down to spelling and case of labels.
>> 
>> - Dialogs should never need vertical scrolling by default (e.g. for a new 
>> object with no columns/constraints/whatever yet defined). If you need to 
>> scroll, then things should be moved to a new tab, grouped as appropriate.
>> 
>> Thanks.
>> 
>>> On Fri, May 20, 2016 at 7:57 AM, Akshay Joshi 
>>>  wrote:
>>> Thanks - Committed with minor changes.
>>> 
 On Thu, May 19, 2016 at 10:47 PM, Harshal Dhumal 
  wrote:
 Hi,
 
 PFA updated patch for table and all it's child nodes (Version 9). This 
 patch does not depend on any of existing table node patch.
 
 Major change in this patch: Unlike pgAdmin3 now in table create mode any 
 constraint(s) created (but not saved) will listen to table column changes 
 and adapt themselves accordingly.
 
 For e.g.
 In table create mode user adds column definition with name "col1" then 
 adds constraint which includes column "col1". Now user changes column name 
 to "col2" then constraint will listen to this change and adapt the column 
 name from "col1" to "col2" in constraint definition. Also if column "col2" 
 is removed then constraint will also remove the column "col2" from it's 
 definition.
 
 
 -- 
 Harshal Dhumal
 Software Engineer 
 
 
 
 EenterpriseDB
 
 
 
 --
 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgadmin-hackers
>>> 
>>> 
>>> 
>>> -- 
>>> Akshay Joshi
>>> Principal Software Engineer 
>>> 
>>> 
>>> 
>>> Phone: +91 20-3058-9517
>>> Mobile: +91 976-788-8246
>> 
>> 
>> 
>> -- 
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>> 
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
> 


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-20 Thread Ashesh Vashi
On Sat, May 21, 2016 at 12:01 AM, Dave Page  wrote:

> Hi
>
> I just started to take a look at the table dialogue and friends. Here are
> a few issues that we need to address - please take care of them:
>
> 1) Move columns to their own tab. Vertical scrolling is bad.
>
Should the 'inherit from table' part of columns tab?

>
> 2) Similarly, move constraints to their own tab.
>
> 3) Ensure all labels only have a capital letter on the first word, except
> if following words are keywords or acronyms, e.g.
>
>   With default values?
>   Has OIDs?
>
> 4) s/System tabel?/System table?
>
> 5) Error messages on fields should not be shown unless the field loses
> focus and has an error (see Create Table)
>
> 6) The sections on the Properties view are not as they should be. As I've
> pointed out before, the "General" section should have a limited subset of
> information, e.g. name, oid, owner, tablespace, comment and "is system?"
> Other properties should be in other appropriate sections.
>
> 7) Variables grids should not be on the Security tab (as also mentioned
> previously).
>
> 8) Field labels that imply a question (e.g. usually those with a Yes/No
> switch for input) should end in a ? - e.g. "Deferrable?"
>
> 9) On the Trigger dialogue, "Fires" and following controls should move to
> a new tab.
>
> 10) On the MV dialogue, VACUUM settings should be on their own tab, as on
> the Table dialogue.
>
> 11) Privileges controls on the Properties lists should be in a "Security"
> group, not "General"
>
> I think there are a couple of basic principles to follow here:
>
> - Make properties lists and dialogues consistent with existing ones, from
> control grouping right down to spelling and case of labels.
>
> - Dialogs should never need vertical scrolling by default (e.g. for a new
> object with no columns/constraints/whatever yet defined). If you need to
> scroll, then things should be moved to a new tab, grouped as appropriate.
>
> Thanks.
>
> On Fri, May 20, 2016 at 7:57 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Thanks - Committed with minor changes.
>>
>> On Thu, May 19, 2016 at 10:47 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA updated patch for table and all it's child nodes (Version 9). This
>>> patch does not depend on any of existing table node patch.
>>>
>>> Major change in this patch: Unlike pgAdmin3 now in table create mode any
>>> constraint(s) created (but not saved) will listen to table column changes
>>> and adapt themselves accordingly.
>>>
>>> For e.g.
>>> In table create mode user adds column definition with name "col1" then
>>> adds constraint which includes column "col1". Now user changes column name
>>> to "col2" then constraint will listen to this change and adapt the column
>>> name from "col1" to "col2" in constraint definition. Also if column "col2"
>>> is removed then constraint will also remove the column "col2" from it's
>>> definition.
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-20 Thread Dave Page
Hi

I just started to take a look at the table dialogue and friends. Here are a
few issues that we need to address - please take care of them:

1) Move columns to their own tab. Vertical scrolling is bad.

2) Similarly, move constraints to their own tab.

3) Ensure all labels only have a capital letter on the first word, except
if following words are keywords or acronyms, e.g.

  With default values?
  Has OIDs?

4) s/System tabel?/System table?

5) Error messages on fields should not be shown unless the field loses
focus and has an error (see Create Table)

6) The sections on the Properties view are not as they should be. As I've
pointed out before, the "General" section should have a limited subset of
information, e.g. name, oid, owner, tablespace, comment and "is system?"
Other properties should be in other appropriate sections.

7) Variables grids should not be on the Security tab (as also mentioned
previously).

8) Field labels that imply a question (e.g. usually those with a Yes/No
switch for input) should end in a ? - e.g. "Deferrable?"

9) On the Trigger dialogue, "Fires" and following controls should move to a
new tab.

10) On the MV dialogue, VACUUM settings should be on their own tab, as on
the Table dialogue.

11) Privileges controls on the Properties lists should be in a "Security"
group, not "General"

I think there are a couple of basic principles to follow here:

- Make properties lists and dialogues consistent with existing ones, from
control grouping right down to spelling and case of labels.

- Dialogs should never need vertical scrolling by default (e.g. for a new
object with no columns/constraints/whatever yet defined). If you need to
scroll, then things should be moved to a new tab, grouped as appropriate.

Thanks.

On Fri, May 20, 2016 at 7:57 AM, Akshay Joshi  wrote:

> Thanks - Committed with minor changes.
>
> On Thu, May 19, 2016 at 10:47 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA updated patch for table and all it's child nodes (Version 9). This
>> patch does not depend on any of existing table node patch.
>>
>> Major change in this patch: Unlike pgAdmin3 now in table create mode any
>> constraint(s) created (but not saved) will listen to table column changes
>> and adapt themselves accordingly.
>>
>> For e.g.
>> In table create mode user adds column definition with name "col1" then
>> adds constraint which includes column "col1". Now user changes column name
>> to "col2" then constraint will listen to this change and adapt the column
>> name from "col1" to "col2" in constraint definition. Also if column "col2"
>> is removed then constraint will also remove the column "col2" from it's
>> definition.
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>



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

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


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-18 Thread Surinder Kumar
Hi,

Please find add-on patch for Column node.
Issue fixed:
1.  Column node, 'Primary key' switch should be hidden under view node,
refer column node visible condition for table node
2.  'Inherited from' column should be hidden.
2.  Other columns except Default value should be disabled.


On Wed, May 18, 2016 at 4:43 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA table add-on patch version 8.4. (apply after 8.3)
> This includes changes for trigger node issues.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, May 18, 2016 at 4:19 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA table add-on patch version 8.3. (apply after 8.2)
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, May 18, 2016 at 3:20 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA table add-on patch version 8.2
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, May 18, 2016 at 2:42 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA patch for table node (version 8.1). apply this patch on version 7
 patch. Not all issue are fixed in this patch. Murtuza will be sending
 version 8.2 witch will have resolution for remaining issues. Apply version
 8.2 patch on version 8.1

 --
 *Harshal Dhumal*
 *Software Engineer *



 EenterpriseDB 

 On Tue, May 17, 2016 at 10:12 PM, Sanket Mehta <
 sanket.me...@enterprisedb.com> wrote:

> Hi Harshal,
>
>
> Below are my review comments:
>
>  I got below warning when I tried to apply the patch for table node as
> mentioned below:
>
> Table creation:
>
>-  Trailing white spaces warnings
>
> $ git apply
> /projects/patches/pgadmin4/Table/table_14_May_V6.patch
>
> /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
> whitespace.
>   return false;
>
>  /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
> whitespace.
>   return false;
>warning: 2 lines add whitespace errors.
>

 Fixed (These were introduced due to rules node.)


>
>- In Table creation dialog, while adding a new primary key, it
>does not allow to change the tablespace to empty. (which is not the 
> case in
>case of tablespace in table)
>
> Fixed

>
>- In Table creation dialog, while adding a new column, data type
>and name field must be mandatory. otherwise while clicking on save it 
> gives
>below error
>
>   File
> "/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1319, in _parse_format_columns
>c['cltype'] = self._cltype_formatter(c['cltype'])
>KeyError: 'cltype
>
 Fixed


>
>- In Table creation dialog, While adding a new column, in primary
>check box is needed to click twice in order to check it. Ideally it 
> should
>be checked by only one click.
>
> This is Backgrid behaviour.

>
>- In Table creation dialog, While adding a new column, primary key
>should not be allowed to added unless user has provided name and data 
> type
>for at least one column.
>
>  Fixed

>
>- currently if user has clicked on add column button and
>immediately click on add primary key button, it will add a row in 
> primary
>key data grid
>
> Fixed

>
>- When delete table/drop cascade is apply on any table, i got a
>javascript error as mentioned below
>
>  node.js:94 Uncaught TypeError: self.canDrop.apply is
> not a function
>
 Already fixed in other commit.


>
>- Once the above error generated, every time user tries to open a
>context menu by right clicking on any existing table, that same error 
> comes
>
> Already fixed in other commit.

>
>- In table creation dialog, if table is inherited from another
>table, if a new primary key is added manually there, the create sql 
> will
>not have an entry for primary key
>
> Fixed

>
>- In table creation dialog, if primary key check box is checked
>while adding the row, a new row is added in primary key datagrid but
>unchecking the primary key checkbox 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-18 Thread Murtuza Zabuawala
Hi,

PFA table add-on patch version 8.4. (apply after 8.3)
This includes changes for trigger node issues.


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

On Wed, May 18, 2016 at 4:19 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA table add-on patch version 8.3. (apply after 8.2)
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, May 18, 2016 at 3:20 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA table add-on patch version 8.2
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, May 18, 2016 at 2:42 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch for table node (version 8.1). apply this patch on version 7
>>> patch. Not all issue are fixed in this patch. Murtuza will be sending
>>> version 8.2 witch will have resolution for remaining issues. Apply version
>>> 8.2 patch on version 8.1
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>> On Tue, May 17, 2016 at 10:12 PM, Sanket Mehta <
>>> sanket.me...@enterprisedb.com> wrote:
>>>
 Hi Harshal,


 Below are my review comments:

  I got below warning when I tried to apply the patch for table node as
 mentioned below:

 Table creation:

-  Trailing white spaces warnings

 $ git apply
 /projects/patches/pgadmin4/Table/table_14_May_V6.patch

 /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
 whitespace.
   return false;

  /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
 whitespace.
   return false;
warning: 2 lines add whitespace errors.

>>>
>>> Fixed (These were introduced due to rules node.)
>>>
>>>

- In Table creation dialog, while adding a new primary key, it does
not allow to change the tablespace to empty. (which is not the case in 
 case
of tablespace in table)

 Fixed
>>>

- In Table creation dialog, while adding a new column, data type
and name field must be mandatory. otherwise while clicking on save it 
 gives
below error

   File
 "/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
 line 1319, in _parse_format_columns
c['cltype'] = self._cltype_formatter(c['cltype'])
KeyError: 'cltype

>>> Fixed
>>>
>>>

- In Table creation dialog, While adding a new column, in primary
check box is needed to click twice in order to check it. Ideally it 
 should
be checked by only one click.

 This is Backgrid behaviour.
>>>

- In Table creation dialog, While adding a new column, primary key
should not be allowed to added unless user has provided name and data 
 type
for at least one column.

  Fixed
>>>

- currently if user has clicked on add column button and
immediately click on add primary key button, it will add a row in 
 primary
key data grid

 Fixed
>>>

- When delete table/drop cascade is apply on any table, i got a
javascript error as mentioned below

  node.js:94 Uncaught TypeError: self.canDrop.apply is
 not a function

>>> Already fixed in other commit.
>>>
>>>

- Once the above error generated, every time user tries to open a
context menu by right clicking on any existing table, that same error 
 comes

 Already fixed in other commit.
>>>

- In table creation dialog, if table is inherited from another
table, if a new primary key is added manually there, the create sql will
not have an entry for primary key

 Fixed
>>>

- In table creation dialog, if primary key check box is checked
while adding the row, a new row is added in primary key datagrid but
unchecking the primary key checkbox from column datagrid, does not 
 removes
that row from primary key data grid.

 Fixed.
>>>

- In AutoVacuum tab, if user provides any invalid value to any
parameter, then a error message should be prompted, only background 
 color
change would not tell user to change the value.

 Expected  behaviour.
>>>

- In table creation dialog, security label are not being added.
javascript error is coming as mentioned below:
  {"success": 0, "info": "", "result": null, "data": null,

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-18 Thread Murtuza Zabuawala
Hi,

PFA table add-on patch version 8.3. (apply after 8.2)


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

On Wed, May 18, 2016 at 3:20 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA table add-on patch version 8.2
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, May 18, 2016 at 2:42 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch for table node (version 8.1). apply this patch on version 7
>> patch. Not all issue are fixed in this patch. Murtuza will be sending
>> version 8.2 witch will have resolution for remaining issues. Apply version
>> 8.2 patch on version 8.1
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>> On Tue, May 17, 2016 at 10:12 PM, Sanket Mehta <
>> sanket.me...@enterprisedb.com> wrote:
>>
>>> Hi Harshal,
>>>
>>>
>>> Below are my review comments:
>>>
>>>  I got below warning when I tried to apply the patch for table node as
>>> mentioned below:
>>>
>>> Table creation:
>>>
>>>-  Trailing white spaces warnings
>>>
>>> $ git apply
>>> /projects/patches/pgadmin4/Table/table_14_May_V6.patch
>>>
>>> /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
>>> whitespace.
>>>   return false;
>>>
>>>  /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
>>> whitespace.
>>>   return false;
>>>warning: 2 lines add whitespace errors.
>>>
>>
>> Fixed (These were introduced due to rules node.)
>>
>>
>>>
>>>- In Table creation dialog, while adding a new primary key, it does
>>>not allow to change the tablespace to empty. (which is not the case in 
>>> case
>>>of tablespace in table)
>>>
>>> Fixed
>>
>>>
>>>- In Table creation dialog, while adding a new column, data type and
>>>name field must be mandatory. otherwise while clicking on save it gives
>>>below error
>>>
>>>   File
>>> "/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>>> line 1319, in _parse_format_columns
>>>c['cltype'] = self._cltype_formatter(c['cltype'])
>>>KeyError: 'cltype
>>>
>> Fixed
>>
>>
>>>
>>>- In Table creation dialog, While adding a new column, in primary
>>>check box is needed to click twice in order to check it. Ideally it 
>>> should
>>>be checked by only one click.
>>>
>>> This is Backgrid behaviour.
>>
>>>
>>>- In Table creation dialog, While adding a new column, primary key
>>>should not be allowed to added unless user has provided name and data 
>>> type
>>>for at least one column.
>>>
>>>  Fixed
>>
>>>
>>>- currently if user has clicked on add column button and immediately
>>>click on add primary key button, it will add a row in primary key data 
>>> grid
>>>
>>> Fixed
>>
>>>
>>>- When delete table/drop cascade is apply on any table, i got a
>>>javascript error as mentioned below
>>>
>>>  node.js:94 Uncaught TypeError: self.canDrop.apply is
>>> not a function
>>>
>> Already fixed in other commit.
>>
>>
>>>
>>>- Once the above error generated, every time user tries to open a
>>>context menu by right clicking on any existing table, that same error 
>>> comes
>>>
>>> Already fixed in other commit.
>>
>>>
>>>- In table creation dialog, if table is inherited from another
>>>table, if a new primary key is added manually there, the create sql will
>>>not have an entry for primary key
>>>
>>> Fixed
>>
>>>
>>>- In table creation dialog, if primary key check box is checked
>>>while adding the row, a new row is added in primary key datagrid but
>>>unchecking the primary key checkbox from column datagrid, does not 
>>> removes
>>>that row from primary key data grid.
>>>
>>> Fixed.
>>
>>>
>>>- In AutoVacuum tab, if user provides any invalid value to any
>>>parameter, then a error message should be prompted, only background color
>>>change would not tell user to change the value.
>>>
>>> Expected  behaviour.
>>
>>>
>>>- In table creation dialog, security label are not being added.
>>>javascript error is coming as mentioned below:
>>>  {"success": 0, "info": "", "result": null, "data": null,
>>>"errormsg": "can't adapt type 'Undefined'"}
>>>
>>>  Fixed
>>
>>>
>>>- In Table creation dialog, while adding foreign key, in action tab.
>>>if user click on 'x' button in "on update" or "on delete" select2 
>>> control,
>>>it gives error "Uncaught SyntaxError: Unexpected end of input"
>>>
>>> Fixed
>>
>>>
>>>- In Table creation dialog, while adding a check constraint,
>>>"validated" button does not work properly
>>>
>>> Fixed.
>>
>>>
>>>- After successfully creation of 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-18 Thread Murtuza Zabuawala
Hi,

PFA table add-on patch version 8.2

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

On Wed, May 18, 2016 at 2:42 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for table node (version 8.1). apply this patch on version 7
> patch. Not all issue are fixed in this patch. Murtuza will be sending
> version 8.2 witch will have resolution for remaining issues. Apply version
> 8.2 patch on version 8.1
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Tue, May 17, 2016 at 10:12 PM, Sanket Mehta <
> sanket.me...@enterprisedb.com> wrote:
>
>> Hi Harshal,
>>
>>
>> Below are my review comments:
>>
>>  I got below warning when I tried to apply the patch for table node as
>> mentioned below:
>>
>> Table creation:
>>
>>-  Trailing white spaces warnings
>>
>> $ git apply
>> /projects/patches/pgadmin4/Table/table_14_May_V6.patch
>>
>> /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
>> whitespace.
>>   return false;
>>
>>  /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
>> whitespace.
>>   return false;
>>warning: 2 lines add whitespace errors.
>>
>
> Fixed (These were introduced due to rules node.)
>
>
>>
>>- In Table creation dialog, while adding a new primary key, it does
>>not allow to change the tablespace to empty. (which is not the case in 
>> case
>>of tablespace in table)
>>
>> Fixed
>
>>
>>- In Table creation dialog, while adding a new column, data type and
>>name field must be mandatory. otherwise while clicking on save it gives
>>below error
>>
>>   File
>> "/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
>> line 1319, in _parse_format_columns
>>c['cltype'] = self._cltype_formatter(c['cltype'])
>>KeyError: 'cltype
>>
> Fixed
>
>
>>
>>- In Table creation dialog, While adding a new column, in primary
>>check box is needed to click twice in order to check it. Ideally it should
>>be checked by only one click.
>>
>> This is Backgrid behaviour.
>
>>
>>- In Table creation dialog, While adding a new column, primary key
>>should not be allowed to added unless user has provided name and data type
>>for at least one column.
>>
>>  Fixed
>
>>
>>- currently if user has clicked on add column button and immediately
>>click on add primary key button, it will add a row in primary key data 
>> grid
>>
>> Fixed
>
>>
>>- When delete table/drop cascade is apply on any table, i got a
>>javascript error as mentioned below
>>
>>  node.js:94 Uncaught TypeError: self.canDrop.apply is not
>> a function
>>
> Already fixed in other commit.
>
>
>>
>>- Once the above error generated, every time user tries to open a
>>context menu by right clicking on any existing table, that same error 
>> comes
>>
>> Already fixed in other commit.
>
>>
>>- In table creation dialog, if table is inherited from another table,
>>if a new primary key is added manually there, the create sql will not have
>>an entry for primary key
>>
>> Fixed
>
>>
>>- In table creation dialog, if primary key check box is checked while
>>adding the row, a new row is added in primary key datagrid but unchecking
>>the primary key checkbox from column datagrid, does not removes that row
>>from primary key data grid.
>>
>> Fixed.
>
>>
>>- In AutoVacuum tab, if user provides any invalid value to any
>>parameter, then a error message should be prompted, only background color
>>change would not tell user to change the value.
>>
>> Expected  behaviour.
>
>>
>>- In table creation dialog, security label are not being added.
>>javascript error is coming as mentioned below:
>>  {"success": 0, "info": "", "result": null, "data": null,
>>"errormsg": "can't adapt type 'Undefined'"}
>>
>>  Fixed
>
>>
>>- In Table creation dialog, while adding foreign key, in action tab.
>>if user click on 'x' button in "on update" or "on delete" select2 control,
>>it gives error "Uncaught SyntaxError: Unexpected end of input"
>>
>> Fixed
>
>>
>>- In Table creation dialog, while adding a check constraint,
>>"validated" button does not work properly
>>
>> Fixed.
>
>>
>>- After successfully creation of table, "table name cannot be empty"
>>error is not getting cleared.
>>
>> Not reproducible.
>
>>
>>- In Table creation dialog, if user has added an empty column without
>>entering its name or type and trying to add check constraint, it will add
>>an empty constraint
>>
>>  Expected  behaviour (Columns are not mandatory for check constrains)
>
>>
>>- In Table creation dialog, while adding an exclude constraint, for
>>"character 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-18 Thread Harshal Dhumal
Hi,

PFA patch for table node (version 8.1). apply this patch on version 7
patch. Not all issue are fixed in this patch. Murtuza will be sending
version 8.2 witch will have resolution for remaining issues. Apply version
8.2 patch on version 8.1

-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Tue, May 17, 2016 at 10:12 PM, Sanket Mehta <
sanket.me...@enterprisedb.com> wrote:

> Hi Harshal,
>
>
> Below are my review comments:
>
>  I got below warning when I tried to apply the patch for table node as
> mentioned below:
>
> Table creation:
>
>-  Trailing white spaces warnings
>
> $ git apply
> /projects/patches/pgadmin4/Table/table_14_May_V6.patch
>
> /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
> whitespace.
>   return false;
>
>  /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
> whitespace.
>   return false;
>warning: 2 lines add whitespace errors.
>

Fixed (These were introduced due to rules node.)


>
>- In Table creation dialog, while adding a new primary key, it does
>not allow to change the tablespace to empty. (which is not the case in case
>of tablespace in table)
>
> Fixed

>
>- In Table creation dialog, while adding a new column, data type and
>name field must be mandatory. otherwise while clicking on save it gives
>below error
>
>   File
> "/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1319, in _parse_format_columns
>c['cltype'] = self._cltype_formatter(c['cltype'])
>KeyError: 'cltype
>
Fixed


>
>- In Table creation dialog, While adding a new column, in primary
>check box is needed to click twice in order to check it. Ideally it should
>be checked by only one click.
>
> This is Backgrid behaviour.

>
>- In Table creation dialog, While adding a new column, primary key
>should not be allowed to added unless user has provided name and data type
>for at least one column.
>
>  Fixed

>
>- currently if user has clicked on add column button and immediately
>click on add primary key button, it will add a row in primary key data grid
>
> Fixed

>
>- When delete table/drop cascade is apply on any table, i got a
>javascript error as mentioned below
>
>  node.js:94 Uncaught TypeError: self.canDrop.apply is not
> a function
>
Already fixed in other commit.


>
>- Once the above error generated, every time user tries to open a
>context menu by right clicking on any existing table, that same error comes
>
> Already fixed in other commit.

>
>- In table creation dialog, if table is inherited from another table,
>if a new primary key is added manually there, the create sql will not have
>an entry for primary key
>
> Fixed

>
>- In table creation dialog, if primary key check box is checked while
>adding the row, a new row is added in primary key datagrid but unchecking
>the primary key checkbox from column datagrid, does not removes that row
>from primary key data grid.
>
> Fixed.

>
>- In AutoVacuum tab, if user provides any invalid value to any
>parameter, then a error message should be prompted, only background color
>change would not tell user to change the value.
>
> Expected  behaviour.

>
>- In table creation dialog, security label are not being added.
>javascript error is coming as mentioned below:
>  {"success": 0, "info": "", "result": null, "data": null, "errormsg":
>"can't adapt type 'Undefined'"}
>
>  Fixed

>
>- In Table creation dialog, while adding foreign key, in action tab.
>if user click on 'x' button in "on update" or "on delete" select2 control,
>it gives error "Uncaught SyntaxError: Unexpected end of input"
>
> Fixed

>
>- In Table creation dialog, while adding a check constraint,
>"validated" button does not work properly
>
> Fixed.

>
>- After successfully creation of table, "table name cannot be empty"
>error is not getting cleared.
>
> Not reproducible.

>
>- In Table creation dialog, if user has added an empty column without
>entering its name or type and trying to add check constraint, it will add
>an empty constraint
>
>  Expected  behaviour (Columns are not mandatory for check constrains)

>
>- In Table creation dialog, while adding an exclude constraint, for
>"character varying" column type, no operators are being listed
>
>  There are no operators for character varying data type.

>
>- In Table creation dialog, while adding an exclude constraint, below
>mentioned error comes if user removes operator class by clicking 'x' on
>that control Uncaught TypeError: Cannot read property 'id' of undefined
>
>  TODO

>
>- In Table creation dialog, SQL is not getting generated for 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-17 Thread Sanket Mehta
Hi Harshal,


Below are my review comments:

 I got below warning when I tried to apply the patch for table node as
mentioned below:

Table creation:

   -  Trailing white spaces warnings

$ git apply
/projects/patches/pgadmin4/Table/table_14_May_V6.patch

/projects/patches/pgadmin4/Table/table_14_May_V6.patch:6008: trailing
whitespace.
  return false;

 /projects/patches/pgadmin4/Table/table_14_May_V6.patch:6016: trailing
whitespace.
  return false;
   warning: 2 lines add whitespace errors.

   - In Table creation dialog, while adding a new primary key, it does not
   allow to change the tablespace to empty. (which is not the case in case of
   tablespace in table)
   - In Table creation dialog, while adding a new column, data type and
   name field must be mandatory. otherwise while clicking on save it gives
   below error

  File
"/projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
line 1319, in _parse_format_columns
   c['cltype'] = self._cltype_formatter(c['cltype'])
   KeyError: 'cltype

   - In Table creation dialog, While adding a new column, in primary check
   box is needed to click twice in order to check it. Ideally it should be
   checked by only one click.
   - In Table creation dialog, While adding a new column, primary key
   should not be allowed to added unless user has provided name and data type
   for atleast one column.
   currently if user has clicked on add column button and immediately click
   on add primary key button, it will add a row in primary key data grid
   - When delete table/drop cascade is apply on any table, i got a
   javascript error as mentioned below

 node.js:94 Uncaught TypeError: self.canDrop.apply is not a
function

   - Once the above error generated, every time user tries to open a
   context menu by right clicking on any existing table, that same error comes
   - In table creation dialog, if table is inherited from another table, if
   a new primary key is added manually there, the create sql will not have an
   entry for primary key
   - In table creation dialog, if primary key check box is checked while
   adding the row, a new row is added in primary key datagrid but unchecking
   the primary key checkbox from column datagrid, does not removes that row
   from primary key data grid.
   - In AutoVacuum tab, if user provides any invalid value to any
   parameter, then a error message should be prompted, only background color
   change would not tell user to change the value.
   - In table creation dialog, security label are not being added.
   javascript error is coming as mentioned below:
 {"success": 0, "info": "", "result": null, "data": null, "errormsg":
   "can't adapt type 'Undefined'"}
   - In Table creation dialog, while adding foreign key, in action tab. if
   user click on 'x' button in "on update" or "on delete" select2 control, it
   gives error "Uncaught SyntaxError: Unexpected end of input"
   - In Table creation dialog, while adding a check constraint, "validated"
   button does not work properly
   - After successfully creation of table, "table name cannot be empty"
   error is not getting cleared.
   - In Table creation dialog, if user has added an empty column without
   entering its name or type and trying to add check constraint, it will add
   an empty constraint
   - In Table creation dialog, while adding an exclude constraint, for
   "character varying" column type, no operators are being listed
   - In Table creation dialog, while adding an exclude constraint, below
   mentioned error comes if user removes operator class by clicking 'x' on
   that control Uncaught TypeError: Cannot read property 'id' of undefined
   - In Table creation dialog, SQL is not getting generated for exclude
   constraint
   - In Table creation dialog, schema should be prefixed with table name in
   "of type" control
   - In Table creation dialog, while adding privileges, it always shows
   default privileges even if user has selected different privileges. (This
   works fine once user edit the privileges in edit table mode and shows only
   those privileges which user selects). Ashesh, please confirm the behaviour.

Table edit mode:

   - If in edit mode, any constraint is already having any comment, then
   remove it. It will not create the SQL for the same.
   - Changing Schema will give server error

Column Creation:

   - Save button is enabled by default
   - Data type validation is not provided. Save button is enabled just
   after providing column name
   - Length field limitation is not provided. (i.e. for numeric type,
   length should be allowed greater than 1000)

Exclusion constraint creation:

   - Access method should not be allowed to be empty. (currently by
   clicking 'x' will remove the selection in it)

Index creation:

   - No 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-17 Thread Murtuza Zabuawala
Hi,

PFA add-on patch to Ver.6 patch,  Which will add CREATE/SELECT etc Script
support into table node.

Regards,
Murtuza

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

On Tue, May 17, 2016 at 11:48 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached add-on patch for table's subnode rule.
> Apply this patch at end after applying previous patches in email thread.
>
> *Issue fixed*: "Do Instead" on Rule node under View/M-View node not
> working in properties mode. Unable to generate proper SQL.
>
> On Mon, May 16, 2016 at 7:02 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA add-on patch for table and it's child node. (please apply this patch
>> on version 6 patch)
>>
>> Murtuza and I fixed following issues:
>>
>> 1. SQL formatting
>> 2. Vacuum grid should not be editable in properties mode.
>> 3. Column datatype does not get displayed in the properties and edit mode.
>> 4. Do not allow to add another primary key if one already exist.
>>
>> And another minor enhancements.
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>> On Sat, May 14, 2016 at 2:03 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>>
>>> Hi,
>>>
>>>
>>> PFA updated patches (version: 6) for table and it's child nodes.
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>> On Fri, May 13, 2016 at 6:55 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Review Comments:

 - Please replace 'can not' with 'cannot'  in all the validation
 messages.
 - PG 9.1+ Inheritance issue as below:

 CREATE TABLE public.table1
 (
 )
 (
 )
 INHERITS (a)
 WITH (
 OIDS = FALSE
 )
 TABLESPACE pg_default;
 ALTER TABLE public.table1
 OWNER to postgres;


 brackets are coming twice.

>>> Fixed
>>>
>>>

 - Please maintain one line spacing between SQL queries In the SQL Tab.

>>> TODO
>>>
>>>
 - Foreign Key Grid in Table css issue: Grid columns expands on the
 selection of the cell

>>> Fixed
>>>
>>>
 - Check Constraint: Validated? option should be True by default

>>> Not sure about this. I cross checked in pgadmin3.
>>>
>>>
>>>
 - pg 9.4: Exclude constraint does not render in SQL tab

>>> Fixed
>>>
>>>
 - Missing Security validation

>>> Fixed
>>>
>>>
 - Vacuum grid should not be editable in properties mode.

>>> TODO (It's editable but one cannot save it on server from here as there
>>> is no save button.)
>>>
>>>
 - Edit mode, Fill Factor can be allowed to be null.

>>> TODO (This is generic issue in Integer and Numeric controls. This issue
>>> is covered in this partial patch
>>> 
>>> )
>>>
>>>
 - While dropping inheritance, related table columns drop SQL are also
 populated in the SQL Tab

 ALTER TABLE public."Tbl"
 NO INHERIT b;
 ALTER TABLE public."Tbl" DROP COLUMN id;
 ALTER TABLE public."Tbl" DROP COLUMN name;


>>> Fixed
>>>
>>>
>>>

 And also render error while clicking on the save button.

 ERROR: syntax error at or near "["
 LINE 2: INHERIT [;

 ^

 Fixed
>>>
>>>
 - in a Reverse Engineering SQL tab, schema_name.tablename should be
 there, currently only table_name displays.

>>> Fixed
>>>
>>>
>>>
 - Column SQL is showing below text with HTML


 -- Column: id -- ALTER TABLE public.a DROIP
 COLUMN id; ALTER TABLE public.a ADD COLUMN id integer;


>>> I was not able to reproduce exact issue but still I have fixed other
>>> issue which I found related to column SQL. Hopefully that will fix this
>>> issue as well.
>>>
>>>
 - The column datatype dependency does not get cleared upon selection of
 another datatype.

>>>  For example, if I select numeric and gives the length and precision.
 After that I change the dat-type then, dependent fields should be get
 cleared.

>>> Fixed.
>>>
>>>

 - The column datatype does not get displayed in the properties and edit
 mode if the length and precision are given while creating a column.

>>>
>>> TODO ( I cannot fix this blindly as this might introduce another
>>> issue(s) in column node. I will need Murtuza's help as he has worked on
>>> column node)
>>>
>>>

 - Statistics is showing null value even after having value.

>>> Fixed
>>>
>>>

 - if the check constraints are not validated then put proper icon in
 tree and also it should be validated in edit mode.

>>> Not reproducible.
>>>
>>>

 NOTE: I have not checked the Indexes, Triggers and Rules 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-17 Thread Surinder Kumar
Hi,

Please find attached add-on patch for table's subnode rule.
Apply this patch at end after applying previous patches in email thread.

*Issue fixed*: "Do Instead" on Rule node under View/M-View node not working
in properties mode. Unable to generate proper SQL.

On Mon, May 16, 2016 at 7:02 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA add-on patch for table and it's child node. (please apply this patch
> on version 6 patch)
>
> Murtuza and I fixed following issues:
>
> 1. SQL formatting
> 2. Vacuum grid should not be editable in properties mode.
> 3. Column datatype does not get displayed in the properties and edit mode.
> 4. Do not allow to add another primary key if one already exist.
>
> And another minor enhancements.
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Sat, May 14, 2016 at 2:03 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>>
>> Hi,
>>
>>
>> PFA updated patches (version: 6) for table and it's child nodes.
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>> On Fri, May 13, 2016 at 6:55 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Review Comments:
>>>
>>> - Please replace 'can not' with 'cannot'  in all the validation messages.
>>> - PG 9.1+ Inheritance issue as below:
>>>
>>> CREATE TABLE public.table1
>>> (
>>> )
>>> (
>>> )
>>> INHERITS (a)
>>> WITH (
>>> OIDS = FALSE
>>> )
>>> TABLESPACE pg_default;
>>> ALTER TABLE public.table1
>>> OWNER to postgres;
>>>
>>>
>>> brackets are coming twice.
>>>
>> Fixed
>>
>>
>>>
>>> - Please maintain one line spacing between SQL queries In the SQL Tab.
>>>
>> TODO
>>
>>
>>> - Foreign Key Grid in Table css issue: Grid columns expands on the
>>> selection of the cell
>>>
>> Fixed
>>
>>
>>> - Check Constraint: Validated? option should be True by default
>>>
>> Not sure about this. I cross checked in pgadmin3.
>>
>>
>>
>>> - pg 9.4: Exclude constraint does not render in SQL tab
>>>
>> Fixed
>>
>>
>>> - Missing Security validation
>>>
>> Fixed
>>
>>
>>> - Vacuum grid should not be editable in properties mode.
>>>
>> TODO (It's editable but one cannot save it on server from here as there
>> is no save button.)
>>
>>
>>> - Edit mode, Fill Factor can be allowed to be null.
>>>
>> TODO (This is generic issue in Integer and Numeric controls. This issue
>> is covered in this partial patch
>> 
>> )
>>
>>
>>> - While dropping inheritance, related table columns drop SQL are also
>>> populated in the SQL Tab
>>>
>>> ALTER TABLE public."Tbl"
>>> NO INHERIT b;
>>> ALTER TABLE public."Tbl" DROP COLUMN id;
>>> ALTER TABLE public."Tbl" DROP COLUMN name;
>>>
>>>
>> Fixed
>>
>>
>>
>>>
>>> And also render error while clicking on the save button.
>>>
>>> ERROR: syntax error at or near "["
>>> LINE 2: INHERIT [;
>>>
>>> ^
>>>
>>> Fixed
>>
>>
>>> - in a Reverse Engineering SQL tab, schema_name.tablename should be
>>> there, currently only table_name displays.
>>>
>> Fixed
>>
>>
>>
>>> - Column SQL is showing below text with HTML
>>>
>>>
>>> -- Column: id -- ALTER TABLE public.a DROIP
>>> COLUMN id; ALTER TABLE public.a ADD COLUMN id integer;
>>>
>>>
>> I was not able to reproduce exact issue but still I have fixed other
>> issue which I found related to column SQL. Hopefully that will fix this
>> issue as well.
>>
>>
>>> - The column datatype dependency does not get cleared upon selection of
>>> another datatype.
>>>
>>  For example, if I select numeric and gives the length and precision.
>>> After that I change the dat-type then, dependent fields should be get
>>> cleared.
>>>
>> Fixed.
>>
>>
>>>
>>> - The column datatype does not get displayed in the properties and edit
>>> mode if the length and precision are given while creating a column.
>>>
>>
>> TODO ( I cannot fix this blindly as this might introduce another issue(s)
>> in column node. I will need Murtuza's help as he has worked on column node)
>>
>>
>>>
>>> - Statistics is showing null value even after having value.
>>>
>> Fixed
>>
>>
>>>
>>> - if the check constraints are not validated then put proper icon in
>>> tree and also it should be validated in edit mode.
>>>
>> Not reproducible.
>>
>>
>>>
>>> NOTE: I have not checked the Indexes, Triggers and Rules nodes as I do
>>> not have much knowledge about it.
>>>
>>>
>>
>>
>>> Thanks,
>>> Khushboo
>>>
>>> On Fri, May 13, 2016 at 5:24 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi

 PFA attached patches for table and it's child nodes with python 2.7
 compatibility.


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


rules_add_on.patch
Description: Binary data

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-16 Thread Harshal Dhumal
Hi,

PFA add-on patch for table and it's child node. (please apply this patch on
version 6 patch)

Murtuza and I fixed following issues:

1. SQL formatting
2. Vacuum grid should not be editable in properties mode.
3. Column datatype does not get displayed in the properties and edit mode.
4. Do not allow to add another primary key if one already exist.

And another minor enhancements.


-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Sat, May 14, 2016 at 2:03 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

>
> Hi,
>
>
> PFA updated patches (version: 6) for table and it's child nodes.
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Fri, May 13, 2016 at 6:55 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Review Comments:
>>
>> - Please replace 'can not' with 'cannot'  in all the validation messages.
>> - PG 9.1+ Inheritance issue as below:
>>
>> CREATE TABLE public.table1
>> (
>> )
>> (
>> )
>> INHERITS (a)
>> WITH (
>> OIDS = FALSE
>> )
>> TABLESPACE pg_default;
>> ALTER TABLE public.table1
>> OWNER to postgres;
>>
>>
>> brackets are coming twice.
>>
> Fixed
>
>
>>
>> - Please maintain one line spacing between SQL queries In the SQL Tab.
>>
> TODO
>
>
>> - Foreign Key Grid in Table css issue: Grid columns expands on the
>> selection of the cell
>>
> Fixed
>
>
>> - Check Constraint: Validated? option should be True by default
>>
> Not sure about this. I cross checked in pgadmin3.
>
>
>
>> - pg 9.4: Exclude constraint does not render in SQL tab
>>
> Fixed
>
>
>> - Missing Security validation
>>
> Fixed
>
>
>> - Vacuum grid should not be editable in properties mode.
>>
> TODO (It's editable but one cannot save it on server from here as there is
> no save button.)
>
>
>> - Edit mode, Fill Factor can be allowed to be null.
>>
> TODO (This is generic issue in Integer and Numeric controls. This issue is
> covered in this partial patch
> 
> )
>
>
>> - While dropping inheritance, related table columns drop SQL are also
>> populated in the SQL Tab
>>
>> ALTER TABLE public."Tbl"
>> NO INHERIT b;
>> ALTER TABLE public."Tbl" DROP COLUMN id;
>> ALTER TABLE public."Tbl" DROP COLUMN name;
>>
>>
> Fixed
>
>
>
>>
>> And also render error while clicking on the save button.
>>
>> ERROR: syntax error at or near "["
>> LINE 2: INHERIT [;
>>
>> ^
>>
>> Fixed
>
>
>> - in a Reverse Engineering SQL tab, schema_name.tablename should be
>> there, currently only table_name displays.
>>
> Fixed
>
>
>
>> - Column SQL is showing below text with HTML
>>
>>
>> -- Column: id -- ALTER TABLE public.a DROIP
>> COLUMN id; ALTER TABLE public.a ADD COLUMN id integer;
>>
>>
> I was not able to reproduce exact issue but still I have fixed other issue
> which I found related to column SQL. Hopefully that will fix this issue as
> well.
>
>
>> - The column datatype dependency does not get cleared upon selection of
>> another datatype.
>>
>  For example, if I select numeric and gives the length and precision.
>> After that I change the dat-type then, dependent fields should be get
>> cleared.
>>
> Fixed.
>
>
>>
>> - The column datatype does not get displayed in the properties and edit
>> mode if the length and precision are given while creating a column.
>>
>
> TODO ( I cannot fix this blindly as this might introduce another issue(s)
> in column node. I will need Murtuza's help as he has worked on column node)
>
>
>>
>> - Statistics is showing null value even after having value.
>>
> Fixed
>
>
>>
>> - if the check constraints are not validated then put proper icon in tree
>> and also it should be validated in edit mode.
>>
> Not reproducible.
>
>
>>
>> NOTE: I have not checked the Indexes, Triggers and Rules nodes as I do
>> not have much knowledge about it.
>>
>>
>
>
>> Thanks,
>> Khushboo
>>
>> On Fri, May 13, 2016 at 5:24 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> PFA attached patches for table and it's child nodes with python 2.7
>>> compatibility.
>>>
>>>
>
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
index a51d5eb..c561159 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
@@ -656,10 +656,31 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
 # Manual Data type formatting
 # If data type has () with them then we need to remove them
 # eg bit(1) because we need to match the name with combobox
+isArray = False
+if column['cltype'].endswith('[]'):
+isArray = True
+  

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-13 Thread Khushboo Vashi
Hi,

Review Comments:

- Please replace 'can not' with 'cannot'  in all the validation messages.
- PG 9.1+ Inheritance issue as below:

CREATE TABLE public.table1
(
)
(
)
INHERITS (a)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.table1
OWNER to postgres;


brackets are coming twice.

- Please maintain one line spacing between SQL queries In the SQL Tab.
- Foreign Key Grid in Table css issue: Grid columns expands on the
selection of the cell
- Check Constraint: Validated? option should be True by default
- pg 9.4: Exclude constraint does not render in SQL tab
- Missing Security validation
- Vacuum grid should not be editable in properties mode.
- Edit mode, Fill Factor can be allowed to be null.
- While dropping inheritance, related table columns drop SQL are also
populated in the SQL Tab

ALTER TABLE public."Tbl"
NO INHERIT b;
ALTER TABLE public."Tbl" DROP COLUMN id;
ALTER TABLE public."Tbl" DROP COLUMN name;


And also render error while clicking on the save button.

ERROR: syntax error at or near "["
LINE 2: INHERIT [;
^

- in a Reverse Engineering SQL tab, schema_name.tablename should be there,
currently only table_name displays.
- Column SQL is showing below text with HTML


-- Column: id -- ALTER TABLE public.a DROP COLUMN
id; ALTER TABLE public.a ADD COLUMN id integer;

- The column datatype dependency does not get cleared upon selection of
another datatype.
 For example, if I select numeric and gives the length and precision. After
that I change the dat-type then, dependent fields should be get cleared.

- The column datatype does not get displayed in the properties and edit
mode if the length and precision are given while creating a column.

- Statistics is showing null value even after having value.

- if the check constraints are not validated then put proper icon in tree
and also it should be validated in edit mode.

NOTE: I have not checked the Indexes, Triggers and Rules nodes as I do not
have much knowledge about it.

Thanks,
Khushboo

On Fri, May 13, 2016 at 5:24 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi
>
> PFA attached patches for table and it's child nodes with python 2.7
> compatibility.
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Thu, May 12, 2016 at 6:55 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> I have started reviewing the patch but the basic functionalities are
>> breaking on python 2.7.
>> Please test the patch on Python 2.7, fix the issues and resend the patch.
>>
>> Thanks,
>> Khushboo
>>
>> On Thu, May 12, 2016 at 6:03 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>> On Tue, May 10, 2016 at 6:37 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Harshal,

 Pending issues to be fixed which I tried but not able to fix in
 Constraints node,

>>> *1)* Adding Primary key in create table mode causes "too much
 recursion" error & Column collection validation error.

>>> Fixed.
>>>
>>>
 *2)* MultiSelect2 rendering issue causing window to hang.

>>> Fixed.
>>>
>>>




 PFA updated patch for table node,
 - Added help file names in js.
 - Added Deps for primary key cell in create table node
 - Corrected validation error messages
 - Formatted SQL templates properly
 - Added support for View in triggers node


 Regards,
 Murtuza

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

 On Mon, May 9, 2016 at 5:51 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Harshal,
>
> Please find comments as below for constraints node,
>
> 1) Not able to create Primary key due to 'Please provide primary key'
> validation error
> 2) Primary key dialog do not close after save.
> 3) Error "too much recursion" when creating Forgien key from New table.
> 4) Error "too much recursion" when creating Check constraint from New
> table.
> 5) Remove console.log from JS (Unique constraint)
> 6) Unique & Exclude constraint are also not working in create mode, No
> SQL is generated in create mode
> 7) If there are no columns on table select2 shows columns of
> previously fetched objects columns.
>
>
>
> Also attaching new updated patch, which will fixes below issues,
> Fixed:
> =
> 1) Do not show Foreign tables under tables node
> 2) In trigger node changed select2 control options as per new format.
> 3) Removed unwanted templates from trigger node
> 4) clean up some unwanted code from trigger node
> 5) Fixed Create sql template in index node
>
>
> 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-12 Thread Khushboo Vashi
Hi,

I have started reviewing the patch but the basic functionalities are
breaking on python 2.7.
Please test the patch on Python 2.7, fix the issues and resend the patch.

Thanks,
Khushboo

On Thu, May 12, 2016 at 6:03 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Tue, May 10, 2016 at 6:37 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Harshal,
>>
>> Pending issues to be fixed which I tried but not able to fix in
>> Constraints node,
>>
> *1)* Adding Primary key in create table mode causes "too much recursion"
>> error & Column collection validation error.
>>
> Fixed.
>
>
>> *2)* MultiSelect2 rendering issue causing window to hang.
>>
> Fixed.
>
>
>>
>>
>>
>>
>> PFA updated patch for table node,
>> - Added help file names in js.
>> - Added Deps for primary key cell in create table node
>> - Corrected validation error messages
>> - Formatted SQL templates properly
>> - Added support for View in triggers node
>>
>>
>> Regards,
>> Murtuza
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Mon, May 9, 2016 at 5:51 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Harshal,
>>>
>>> Please find comments as below for constraints node,
>>>
>>> 1) Not able to create Primary key due to 'Please provide primary key'
>>> validation error
>>> 2) Primary key dialog do not close after save.
>>> 3) Error "too much recursion" when creating Forgien key from New table.
>>> 4) Error "too much recursion" when creating Check constraint from New
>>> table.
>>> 5) Remove console.log from JS (Unique constraint)
>>> 6) Unique & Exclude constraint are also not working in create mode, No
>>> SQL is generated in create mode
>>> 7) If there are no columns on table select2 shows columns of previously
>>> fetched objects columns.
>>>
>>>
>>>
>>> Also attaching new updated patch, which will fixes below issues,
>>> Fixed:
>>> =
>>> 1) Do not show Foreign tables under tables node
>>> 2) In trigger node changed select2 control options as per new format.
>>> 3) Removed unwanted templates from trigger node
>>> 4) clean up some unwanted code from trigger node
>>> 5) Fixed Create sql template in index node
>>>
>>>
>>> Regards,
>>> Murtuza
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Sat, May 7, 2016 at 7:45 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find below responses.

>
> Please find the review comments so far:
>
> 1. On the Table Collection node, The fields in the grid should be
> Name, Owner and Comments. OID is not required. Please follow same for the
> other Nodes like Index, Constraints etc.
>

 Fixed

> 2. While Updating the Table, Add any column as well as Inherits any
> table, then the check the SQL tab.
> ALTER TABLE SQL should be come in the new line
>
> *Current SQL Tab:*
>
> ALTER TABLE pem.agent_heartbeat
> INHERIT pem.alert_history;ALTER TABLE pem.agent_heartbeat
> ADD COLUMN test bigint;
>
 Fixed


> 3. While Creating/updating table, if the Schema is other than selected
> one, then after saving the table, it is not falling under the same schema.
> And also in update mode it gives an error.
>
 TODO


> 4. Unlogged setting does not honor the change of value.
>
 Not reproducible.


> 5. Please Check SQL tab for all the Nodes as most of them having
> problem of No blank lines/More than one Blank Lines/Blank Lines at the end
> etc.
>
 Fixed


> 6. Creating Table with  auto_vacuum and updating only one field then
> wrong SQL is generated.
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 12,
> autovacuum_enabled = TRUE,
> ,
> autovacuum_vacuum_cost_delay = 21
> )
>
> Fixed.


> 7. Same as toast
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 12,
> autovacuum_enabled = TRUE,
> toast.autovacuum_enabled = TRUE,
> autovacuum_analyze_scale_factor = 1,
> autovacuum_analyze_threshold = 2,
> autovacuum_freeze_max_age = 2,
> ,
> toast.autovacuum_vacuum_cost_limit = 2,
> toast.autovacuum_freeze_min_age = 4
> )
>
 Fixed


>
> 8. Sometimes while creating table and checking sql table, below error
> is coming
>
>   File
> "/home/khushboo/Projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1060, in properties
> data = res['rows'][0]
> IndexError: list index out of range
>
 TODO. (Need exact steps to 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-12 Thread Harshal Dhumal
Hi,


-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Tue, May 10, 2016 at 6:37 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Harshal,
>
> Pending issues to be fixed which I tried but not able to fix in
> Constraints node,
>
*1)* Adding Primary key in create table mode causes "too much recursion"
> error & Column collection validation error.
>
Fixed.


> *2)* MultiSelect2 rendering issue causing window to hang.
>
Fixed.


>
>
>
>
> PFA updated patch for table node,
> - Added help file names in js.
> - Added Deps for primary key cell in create table node
> - Corrected validation error messages
> - Formatted SQL templates properly
> - Added support for View in triggers node
>
>
> Regards,
> Murtuza
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, May 9, 2016 at 5:51 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Harshal,
>>
>> Please find comments as below for constraints node,
>>
>> 1) Not able to create Primary key due to 'Please provide primary key'
>> validation error
>> 2) Primary key dialog do not close after save.
>> 3) Error "too much recursion" when creating Forgien key from New table.
>> 4) Error "too much recursion" when creating Check constraint from New
>> table.
>> 5) Remove console.log from JS (Unique constraint)
>> 6) Unique & Exclude constraint are also not working in create mode, No
>> SQL is generated in create mode
>> 7) If there are no columns on table select2 shows columns of previously
>> fetched objects columns.
>>
>>
>>
>> Also attaching new updated patch, which will fixes below issues,
>> Fixed:
>> =
>> 1) Do not show Foreign tables under tables node
>> 2) In trigger node changed select2 control options as per new format.
>> 3) Removed unwanted templates from trigger node
>> 4) clean up some unwanted code from trigger node
>> 5) Fixed Create sql template in index node
>>
>>
>> Regards,
>> Murtuza
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Sat, May 7, 2016 at 7:45 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find below responses.
>>>

 Please find the review comments so far:

 1. On the Table Collection node, The fields in the grid should be Name,
 Owner and Comments. OID is not required. Please follow same for the other
 Nodes like Index, Constraints etc.

>>>
>>> Fixed
>>>
 2. While Updating the Table, Add any column as well as Inherits any
 table, then the check the SQL tab.
 ALTER TABLE SQL should be come in the new line

 *Current SQL Tab:*

 ALTER TABLE pem.agent_heartbeat
 INHERIT pem.alert_history;ALTER TABLE pem.agent_heartbeat
 ADD COLUMN test bigint;

>>> Fixed
>>>
>>>
 3. While Creating/updating table, if the Schema is other than selected
 one, then after saving the table, it is not falling under the same schema.
 And also in update mode it gives an error.

>>> TODO
>>>
>>>
 4. Unlogged setting does not honor the change of value.

>>> Not reproducible.
>>>
>>>
 5. Please Check SQL tab for all the Nodes as most of them having
 problem of No blank lines/More than one Blank Lines/Blank Lines at the end
 etc.

>>> Fixed
>>>
>>>
 6. Creating Table with  auto_vacuum and updating only one field then
 wrong SQL is generated.
 WITH (
 OIDS = TRUE,
 FILLFACTOR = 12,
 autovacuum_enabled = TRUE,
 ,
 autovacuum_vacuum_cost_delay = 21
 )

 Fixed.
>>>
>>>
 7. Same as toast
 WITH (
 OIDS = TRUE,
 FILLFACTOR = 12,
 autovacuum_enabled = TRUE,
 toast.autovacuum_enabled = TRUE,
 autovacuum_analyze_scale_factor = 1,
 autovacuum_analyze_threshold = 2,
 autovacuum_freeze_max_age = 2,
 ,
 toast.autovacuum_vacuum_cost_limit = 2,
 toast.autovacuum_freeze_min_age = 4
 )

>>> Fixed
>>>
>>>

 8. Sometimes while creating table and checking sql table, below error
 is coming

   File
 "/home/khushboo/Projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
 line 1060, in properties
 data = res['rows'][0]
 IndexError: list index out of range

>>> TODO. (Need exact steps to reproduce.)
>>>
>>>

 9. Please check all the Grid table columns. It should not be expanded
 while editing directly into the grid. For ref: Check constraint grid

>>> TODO
>>>
>>>
>>>

 10. Constraint Nodes are not covered yet due to validation issue on
 which Harshal is working.

>>> Done.
>>>
>>>

 11. While creating the table if auto-vacuume has been enabled by user,
 then it should stay enabled in Edit mode also. Currently 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-07 Thread Harshal Dhumal
Hi,

Please find below responses.

>
> Please find the review comments so far:
>
> 1. On the Table Collection node, The fields in the grid should be Name,
> Owner and Comments. OID is not required. Please follow same for the other
> Nodes like Index, Constraints etc.
>

Fixed

> 2. While Updating the Table, Add any column as well as Inherits any table,
> then the check the SQL tab.
> ALTER TABLE SQL should be come in the new line
>
> *Current SQL Tab:*
>
> ALTER TABLE pem.agent_heartbeat
> INHERIT pem.alert_history;ALTER TABLE pem.agent_heartbeat
> ADD COLUMN test bigint;
>
Fixed


> 3. While Creating/updating table, if the Schema is other than selected
> one, then after saving the table, it is not falling under the same schema.
> And also in update mode it gives an error.
>
TODO


> 4. Unlogged setting does not honor the change of value.
>
Not reproducible.


> 5. Please Check SQL tab for all the Nodes as most of them having problem
> of No blank lines/More than one Blank Lines/Blank Lines at the end etc.
>
Fixed


> 6. Creating Table with  auto_vacuum and updating only one field then wrong
> SQL is generated.
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 12,
> autovacuum_enabled = TRUE,
> ,
> autovacuum_vacuum_cost_delay = 21
> )
>
> Fixed.


> 7. Same as toast
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 12,
> autovacuum_enabled = TRUE,
> toast.autovacuum_enabled = TRUE,
> autovacuum_analyze_scale_factor = 1,
> autovacuum_analyze_threshold = 2,
> autovacuum_freeze_max_age = 2,
> ,
> toast.autovacuum_vacuum_cost_limit = 2,
> toast.autovacuum_freeze_min_age = 4
> )
>
Fixed


>
> 8. Sometimes while creating table and checking sql table, below error is
> coming
>
>   File
> "/home/khushboo/Projects/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py",
> line 1060, in properties
> data = res['rows'][0]
> IndexError: list index out of range
>
TODO. (Need exact steps to reproduce.)


>
> 9. Please check all the Grid table columns. It should not be expanded
> while editing directly into the grid. For ref: Check constraint grid
>
TODO



>
> 10. Constraint Nodes are not covered yet due to validation issue on which
> Harshal is working.
>
Done.


>
> 11. While creating the table if auto-vacuume has been enabled by user,
> then it should stay enabled in Edit mode also. Currently it is not.
>
Fixed



> 12 .If I just enable 'custom auto activated' and don't update anything
> then SQL tab is generating below SQL which is wrong.
>
> ALTER TABLE pem.khushboo1 SET (
>
> );
>
Fixed


>
> 13. IF I Change privileges from pem_agent to agent1 then the SQL i like
> below, which is not corrent
>
> REVOKE ALL ON TABLE pem.khushboo1 FROM agent1;
> GRANT SELECT ON TABLE pem.khushboo1 TO agent1;
>

Not reproducible Or please provide steps to reproduce.



> 14. In check constraint, change "Don't Validate" to Validated? Please
> refer Domain Constraint for the same.
>
Fixed.


>
> 15. SQL for the Column is coming as below, which is not correct.
>
> -- Column: col3 -- ALTER TABLE pem.khushboo1 DROP
> COLUMN col3; ALTER TABLE pem.khushboo1 ADD COLUMN col3 integer NOT
> NULL;
>

Not reproducible Or please provide steps to reproduce.



>
> 16. While updating table columns from column node. Below SQL generating an
> error.
>
> ALTER TABLE pem.khushboo1
> ALTER COLUMN col2 numeric(1, 1);
>
Fixed


>
> 17. After deleting any column, the properties of the another column of the
> same table doesn't show up. Gives below error.
>
> TypeError: self.canDrop.apply is not a function
>
> ...lf.canDrop) ? function() { return self.canDrop.apply(self, arguments);
> } : fals
>

This issue is already raised.


> 18.  Table Node : Exclusion constraint : Grid validates DESC instead of
> operator.
>

Not reproducible.


>
> 19. Please check validation of the Exclusion control, as some JS error is
> coming and due to this, we can not close the dialogue.
>
> The select2('destroy') method was called on an element that is not
> using Select2.
>
>
> ...this.$dropdown.on(d.join("
> "),function(a){a.stopPropagation()})},a}),b.define("s...
>
> select2min.js (line 3)
> TypeError: c is undefined
>

This is already fixed.


>
> 20. While updating the comments field of the Index node, it throws below
> error:
>
> TypeError: obj is null
>
> } else if ((obj.sessChanged && obj.sessChanged()) || isNew) {
>

This is already fixed.



> 21. Job Trigger : Validation missing, so user can't get an idea what is
> missing while checking the SQL tab
>

Fixed.


> 22. For the reverse Engineering SQL tab, the constraints should be start
> with Schema.Table.Constraint. Please follow same path for all the nodes.
>

I cross checked with pgadmin3. Reverse Engineering SQL looks good to me.
Please let me know what is missing?


> 23. Indexes : Comments can not be updated. Please check the attached
> screen-shot for reference.
>
Fixed


> 24. Spelling mistake of 'Definition' in Indexes.

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-07 Thread Harshal Dhumal
Hi,

i have fixed all of below mentioned issues.


> A couple more:
>


>
> If I go to create a new table, give it a name, select a table to
> inherit from, and then do nothing else, I get an error:
>
> ERROR: syntax error at or near "INHERITS"
> LINE 2: INHERITS (test)
> ^
>
> This is because no column list was provided, and in this case, an
> empty one would be needed.  So instead of:
>
> CREATE TABLE public.test2
> (
> )
> INHERITS (test)
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
> It should be:
>
> CREATE TABLE public.test2
> INHERITS (test)
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
>
> If I go to create another new table, give it a name, and then in the
> Like section on the Advance tab, I select a table, and enable each of
> the With * options, the following SQL is produced:
>
> CREATE TABLE public.test2
> LIKE public.test
> INCLUDING DEFAULTS
> INCLUDING CONSTRAINTS
> INCLUDING INDEXES
> INCLUDING STORAGE
> INCLUDING COMMENTSWITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
> The LIKE statement should appear in the column list section, so should
> be surrounded in parentheses.  Also, the WITH statement here is not on
> a new line.
>
> So this should be:
>
> CREATE TABLE public.test2
> (
> LIKE public.test
> INCLUDING DEFAULTS
> INCLUDING CONSTRAINTS
> INCLUDING INDEXES
> INCLUDING STORAGE
> INCLUDING COMMENTS
> )
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
>
>

>
> Thom
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-05-07 Thread Harshal Dhumal
Hi,


-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Wed, Apr 27, 2016 at 6:13 PM, Thom Brown  wrote:

> On 27 April 2016 at 10:22, Harshal Dhumal
>  wrote:
> >
> > Hi,
> >
> > PFA attached patches for table node and all table child nodes.
> >
> > This patch includes below nodes,
> >
> > 1) Table node  -- Initial patch by Murtuza,
> constraints compatibility by Harshal.
> > 2) Column node   -- by Murtuza.
> > 3) Index node  -- by Murtuza.
> > 4) Trigger node-- by Murtuzz.
> > 6) Rules node  -- by Surinder.
> > 7) Constraints nodes:
> >   i]  Index Constraint -- Initial patch by Harshal,
> Integration with table node by Murtuza.
> >   ii] Foreign key-- Initial patch and
> Integration with table node by Harshal.
> >   iii] Check constraint-- Initial patch and
> Integration with table node by Harshal.
> >   iv] Exclusion constraint   -- Initial patch and
> Integration with table node by Harshal.
> >
> > Please apply patches in following order as all of them depends on each
> other.
> >
> > Order:  Table Node > Index constraint ---> remaining patches in any
> order.
> >
> >
>
> Nice work.  Here's some initial feedback from a very quick play around.
>
> On the Create table editor, in the Advance tab (which should probably
> be labelled "Advanced"), the Like section should grey out the "With *"
> values if no relation is selected in the drop-down box.
>
> Fixed


> The way primary keys are defined are kinda awkward.  It might be
> useful to provide some kind of checkbox on the initial column list
> that tells it which columns are involved in the primary key, then the
> user could just select which ones they want.  If they want to refine
> it, they could edit it in the Constraints > Primary Key section.
>

I have added functionality. However check box will only be enabled in
expanded mode of column (by clicking on edit button which at left side of
delete button). To enable check box in grid mode this

patch needs to be committed.


>
> I'm getting weird spacing in the SQL output.  Here's an example:
>
> CREATE UNLOGGED TABLE public.test
> (
> id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
> stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
> CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
> )
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 88,
> autovacuum_enabled = TRUE,
> autovacuum_analyze_scale_factor = 0.33,
> autovacuum_analyze_threshold = 30,
> autovacuum_freeze_max_age = 333,
> autovacuum_vacuum_cost_delay = 30,
> autovacuum_vacuum_cost_limit = 3,
> autovacuum_vacuum_scale_factor = 0.33,
> autovacuum_vacuum_threshold = 33,
> autovacuum_freeze_min_age = 330,
> autovacuum_freeze_table_age = 33300
> )
> TABLESPACE pg_default;
>
> ALTER TABLE public.test
> OWNER to thom;
> GRANT ALL ON TABLE public.test TO thom;
>
>
> COMMENT ON TABLE public.test
> IS 'This is just a test table';
>
> COMMENT ON COLUMN public.test.id
> IS 'the main ID';
>
> ALTER TABLE public.test
> ALTER COLUMN id
> SET (n_distinct='0.2');
> COMMENT ON CONSTRAINT pk ON public.test
> IS 'primary key test'
>
> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
> none before the COMMENT ON CONSTRAINT line.
>
> This SQL fails because collations aren't allowed on integer columns,
> and the DEFAULT value for the column named stuff doesn't quote it as a
> string literal, so it's looking for a column called "hello".
>
> There's also no way to view the autovacuum options I defined other
> than the SQL pane.
>
>
Fixed the spacing.


> Thom
>


Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-04-28 Thread Harshal Dhumal
-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Thu, Apr 28, 2016 at 2:22 PM, Dave Page  wrote:

>
>
> > On 27 Apr 2016, at 13:43, Thom Brown  wrote:
> >
> > On 27 April 2016 at 10:22, Harshal Dhumal
> >  wrote:
> >>
> >> Hi,
> >>
> >> PFA attached patches for table node and all table child nodes.
> >>
> >> This patch includes below nodes,
> >>
> >> 1) Table node  -- Initial patch by Murtuza,
> constraints compatibility by Harshal.
> >> 2) Column node   -- by Murtuza.
> >> 3) Index node  -- by Murtuza.
> >> 4) Trigger node-- by Murtuzz.
> >> 6) Rules node  -- by Surinder.
> >> 7) Constraints nodes:
> >>  i]  Index Constraint -- Initial patch by Harshal,
> Integration with table node by Murtuza.
> >>  ii] Foreign key-- Initial patch and
> Integration with table node by Harshal.
> >>  iii] Check constraint-- Initial patch and
> Integration with table node by Harshal.
> >>  iv] Exclusion constraint   -- Initial patch and
> Integration with table node by Harshal.
> >>
> >> Please apply patches in following order as all of them depends on each
> other.
> >>
> >> Order:  Table Node > Index constraint ---> remaining patches in any
> order.
> >
> > Nice work.  Here's some initial feedback from a very quick play around.
> >
> > On the Create table editor, in the Advance tab (which should probably
> > be labelled "Advanced"), the Like section should grey out the "With *"
> > values if no relation is selected in the drop-down box.
> >
> > The way primary keys are defined are kinda awkward.  It might be
> > useful to provide some kind of checkbox on the initial column list
> > that tells it which columns are involved in the primary key, then the
> > user could just select which ones they want.  If they want to refine
> > it, they could edit it in the Constraints > Primary Key section.
>
> If the design we did has been properly followed (I can't check right now),
> then that's exactly how it should be working. Harshal?
>

I can't comment on entire table node ui design as I haven't worked on it
except the constraints nodes.

In constraints nodes I can see that order of some properties in tabs is not
same as that of design (this can be easily changed by reordering schema
properties of constraints node).

And also currently there is no support to show two or more controls inline
in dialog and where in design for e.g In Unique key constraint under
columns tab the "Order" and "Null's order" are shown inline (there are many
of like this). So all controls are rendered on separate row which is not as
per design.


> Arun Kollan and I spent a lot of time redesigning the table dialogue to
> make it as quick and efficient to use as possible. There will likely be
> minor deviations from that design to ensure consistency with the way other
> parts of the app have turned out, but the basic principles should be there.
>
> >
> > I'm getting weird spacing in the SQL output.  Here's an example:
> >
> > CREATE UNLOGGED TABLE public.test
> > (
> >id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
> >stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
> >CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
> > )
> > WITH (
> >OIDS = TRUE,
> >FILLFACTOR = 88,
> >autovacuum_enabled = TRUE,
> >autovacuum_analyze_scale_factor = 0.33,
> >autovacuum_analyze_threshold = 30,
> >autovacuum_freeze_max_age = 333,
> >autovacuum_vacuum_cost_delay = 30,
> >autovacuum_vacuum_cost_limit = 3,
> >autovacuum_vacuum_scale_factor = 0.33,
> >autovacuum_vacuum_threshold = 33,
> >autovacuum_freeze_min_age = 330,
> >autovacuum_freeze_table_age = 33300
> > )
> > TABLESPACE pg_default;
> >
> > ALTER TABLE public.test
> >OWNER to thom;
> > GRANT ALL ON TABLE public.test TO thom;
> >
> >
> > COMMENT ON TABLE public.test
> >IS 'This is just a test table';
> >
> > COMMENT ON COLUMN public.test.id
> >IS 'the main ID';
> >
> > ALTER TABLE public.test
> >ALTER COLUMN id
> >SET (n_distinct='0.2');
> > COMMENT ON CONSTRAINT pk ON public.test
> >IS 'primary key test'
> >
> > Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
> > none before the COMMENT ON CONSTRAINT line.
> >
> > This SQL fails because collations aren't allowed on integer columns,
> > and the DEFAULT value for the column named stuff doesn't quote it as a
> > string literal, so it's looking for a column called "hello".
> >
> > There's also no way to view the autovacuum options I defined other
> > than the SQL pane.
> >
> > Thom
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> > To make changes 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-04-28 Thread Dave Page


> On 27 Apr 2016, at 13:43, Thom Brown  wrote:
> 
> On 27 April 2016 at 10:22, Harshal Dhumal
>  wrote:
>> 
>> Hi,
>> 
>> PFA attached patches for table node and all table child nodes.
>> 
>> This patch includes below nodes,
>> 
>> 1) Table node  -- Initial patch by Murtuza, 
>> constraints compatibility by Harshal.
>> 2) Column node   -- by Murtuza.
>> 3) Index node  -- by Murtuza.
>> 4) Trigger node-- by Murtuzz.
>> 6) Rules node  -- by Surinder.
>> 7) Constraints nodes:
>>  i]  Index Constraint -- Initial patch by Harshal, 
>> Integration with table node by Murtuza.
>>  ii] Foreign key-- Initial patch and Integration 
>> with table node by Harshal.
>>  iii] Check constraint-- Initial patch and Integration 
>> with table node by Harshal.
>>  iv] Exclusion constraint   -- Initial patch and Integration 
>> with table node by Harshal.
>> 
>> Please apply patches in following order as all of them depends on each other.
>> 
>> Order:  Table Node > Index constraint ---> remaining patches in any 
>> order.
> 
> Nice work.  Here's some initial feedback from a very quick play around.
> 
> On the Create table editor, in the Advance tab (which should probably
> be labelled "Advanced"), the Like section should grey out the "With *"
> values if no relation is selected in the drop-down box.
> 
> The way primary keys are defined are kinda awkward.  It might be
> useful to provide some kind of checkbox on the initial column list
> that tells it which columns are involved in the primary key, then the
> user could just select which ones they want.  If they want to refine
> it, they could edit it in the Constraints > Primary Key section.

If the design we did has been properly followed (I can't check right now), then 
that's exactly how it should be working. Harshal?

Arun Kollan and I spent a lot of time redesigning the table dialogue to make it 
as quick and efficient to use as possible. There will likely be minor 
deviations from that design to ensure consistency with the way other parts of 
the app have turned out, but the basic principles should be there.

> 
> I'm getting weird spacing in the SQL output.  Here's an example:
> 
> CREATE UNLOGGED TABLE public.test
> (
>id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
>stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
>CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
> )
> WITH (
>OIDS = TRUE,
>FILLFACTOR = 88,
>autovacuum_enabled = TRUE,
>autovacuum_analyze_scale_factor = 0.33,
>autovacuum_analyze_threshold = 30,
>autovacuum_freeze_max_age = 333,
>autovacuum_vacuum_cost_delay = 30,
>autovacuum_vacuum_cost_limit = 3,
>autovacuum_vacuum_scale_factor = 0.33,
>autovacuum_vacuum_threshold = 33,
>autovacuum_freeze_min_age = 330,
>autovacuum_freeze_table_age = 33300
> )
> TABLESPACE pg_default;
> 
> ALTER TABLE public.test
>OWNER to thom;
> GRANT ALL ON TABLE public.test TO thom;
> 
> 
> COMMENT ON TABLE public.test
>IS 'This is just a test table';
> 
> COMMENT ON COLUMN public.test.id
>IS 'the main ID';
> 
> ALTER TABLE public.test
>ALTER COLUMN id
>SET (n_distinct='0.2');
> COMMENT ON CONSTRAINT pk ON public.test
>IS 'primary key test'
> 
> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
> none before the COMMENT ON CONSTRAINT line.
> 
> This SQL fails because collations aren't allowed on integer columns,
> and the DEFAULT value for the column named stuff doesn't quote it as a
> string literal, so it's looking for a column called "hello".
> 
> There's also no way to view the autovacuum options I defined other
> than the SQL pane.
> 
> Thom
> 
> 
> -- 
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers


-- 
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] Tables node (pgAdmin4)

2016-04-28 Thread Thom Brown
On 27 April 2016 at 14:34, Thom Brown  wrote:
> On 27 April 2016 at 13:43, Thom Brown  wrote:
>> On 27 April 2016 at 10:22, Harshal Dhumal
>>  wrote:
>>>
>>> Hi,
>>>
>>> PFA attached patches for table node and all table child nodes.
>>>
>>> This patch includes below nodes,
>>>
>>> 1) Table node  -- Initial patch by Murtuza, 
>>> constraints compatibility by Harshal.
>>> 2) Column node   -- by Murtuza.
>>> 3) Index node  -- by Murtuza.
>>> 4) Trigger node-- by Murtuzz.
>>> 6) Rules node  -- by Surinder.
>>> 7) Constraints nodes:
>>>   i]  Index Constraint -- Initial patch by Harshal, 
>>> Integration with table node by Murtuza.
>>>   ii] Foreign key-- Initial patch and 
>>> Integration with table node by Harshal.
>>>   iii] Check constraint-- Initial patch and Integration 
>>> with table node by Harshal.
>>>   iv] Exclusion constraint   -- Initial patch and Integration 
>>> with table node by Harshal.
>>>
>>> Please apply patches in following order as all of them depends on each 
>>> other.
>>>
>>> Order:  Table Node > Index constraint ---> remaining patches in any 
>>> order.
>>>
>>>
>>
>> Nice work.  Here's some initial feedback from a very quick play around.
>>
>> On the Create table editor, in the Advance tab (which should probably
>> be labelled "Advanced"), the Like section should grey out the "With *"
>> values if no relation is selected in the drop-down box.
>>
>> The way primary keys are defined are kinda awkward.  It might be
>> useful to provide some kind of checkbox on the initial column list
>> that tells it which columns are involved in the primary key, then the
>> user could just select which ones they want.  If they want to refine
>> it, they could edit it in the Constraints > Primary Key section.
>>
>> I'm getting weird spacing in the SQL output.  Here's an example:
>>
>> CREATE UNLOGGED TABLE public.test
>> (
>> id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
>> stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
>> CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
>> )
>> WITH (
>> OIDS = TRUE,
>> FILLFACTOR = 88,
>> autovacuum_enabled = TRUE,
>> autovacuum_analyze_scale_factor = 0.33,
>> autovacuum_analyze_threshold = 30,
>> autovacuum_freeze_max_age = 333,
>> autovacuum_vacuum_cost_delay = 30,
>> autovacuum_vacuum_cost_limit = 3,
>> autovacuum_vacuum_scale_factor = 0.33,
>> autovacuum_vacuum_threshold = 33,
>> autovacuum_freeze_min_age = 330,
>> autovacuum_freeze_table_age = 33300
>> )
>> TABLESPACE pg_default;
>>
>> ALTER TABLE public.test
>> OWNER to thom;
>> GRANT ALL ON TABLE public.test TO thom;
>>
>>
>> COMMENT ON TABLE public.test
>> IS 'This is just a test table';
>>
>> COMMENT ON COLUMN public.test.id
>> IS 'the main ID';
>>
>> ALTER TABLE public.test
>> ALTER COLUMN id
>> SET (n_distinct='0.2');
>> COMMENT ON CONSTRAINT pk ON public.test
>> IS 'primary key test'
>>
>> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
>> none before the COMMENT ON CONSTRAINT line.
>>
>> This SQL fails because collations aren't allowed on integer columns,
>> and the DEFAULT value for the column named stuff doesn't quote it as a
>> string literal, so it's looking for a column called "hello".
>>
>> There's also no way to view the autovacuum options I defined other
>> than the SQL pane.
>
> A couple more:
>
> If I go to create a new table, give it a name, select a table to
> inherit from, and then do nothing else, I get an error:
>
> ERROR: syntax error at or near "INHERITS"
> LINE 2: INHERITS (test)
> ^
>
> This is because no column list was provided, and in this case, an
> empty one would be needed.  So instead of:
>
> CREATE TABLE public.test2
> (
> )
> INHERITS (test)
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
> It should be:
>
> CREATE TABLE public.test2
> INHERITS (test)
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;

Correction, these should be the other way around.

Thom


-- 
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] Tables node (pgAdmin4)

2016-04-27 Thread Murtuza Zabuawala
Hi Thom,

Thank you for your inputs, Will work on it & send updated patch again.


Regards,
Murtuza


> On 27-Apr-2016, at 7:04 pm, Thom Brown  wrote:
> 
> On 27 April 2016 at 13:43, Thom Brown  wrote:
>> On 27 April 2016 at 10:22, Harshal Dhumal
>>  wrote:
>>> 
>>> Hi,
>>> 
>>> PFA attached patches for table node and all table child nodes.
>>> 
>>> This patch includes below nodes,
>>> 
>>> 1) Table node  -- Initial patch by Murtuza, 
>>> constraints compatibility by Harshal.
>>> 2) Column node   -- by Murtuza.
>>> 3) Index node  -- by Murtuza.
>>> 4) Trigger node-- by Murtuzz.
>>> 6) Rules node  -- by Surinder.
>>> 7) Constraints nodes:
>>>  i]  Index Constraint -- Initial patch by Harshal, 
>>> Integration with table node by Murtuza.
>>>  ii] Foreign key-- Initial patch and 
>>> Integration with table node by Harshal.
>>>  iii] Check constraint-- Initial patch and Integration 
>>> with table node by Harshal.
>>>  iv] Exclusion constraint   -- Initial patch and Integration 
>>> with table node by Harshal.
>>> 
>>> Please apply patches in following order as all of them depends on each 
>>> other.
>>> 
>>> Order:  Table Node > Index constraint ---> remaining patches in any 
>>> order.
>>> 
>>> 
>> 
>> Nice work.  Here's some initial feedback from a very quick play around.
>> 
>> On the Create table editor, in the Advance tab (which should probably
>> be labelled "Advanced"), the Like section should grey out the "With *"
>> values if no relation is selected in the drop-down box.
>> 
>> The way primary keys are defined are kinda awkward.  It might be
>> useful to provide some kind of checkbox on the initial column list
>> that tells it which columns are involved in the primary key, then the
>> user could just select which ones they want.  If they want to refine
>> it, they could edit it in the Constraints > Primary Key section.
>> 
>> I'm getting weird spacing in the SQL output.  Here's an example:
>> 
>> CREATE UNLOGGED TABLE public.test
>> (
>>id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
>>stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
>>CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
>> )
>> WITH (
>>OIDS = TRUE,
>>FILLFACTOR = 88,
>>autovacuum_enabled = TRUE,
>>autovacuum_analyze_scale_factor = 0.33,
>>autovacuum_analyze_threshold = 30,
>>autovacuum_freeze_max_age = 333,
>>autovacuum_vacuum_cost_delay = 30,
>>autovacuum_vacuum_cost_limit = 3,
>>autovacuum_vacuum_scale_factor = 0.33,
>>autovacuum_vacuum_threshold = 33,
>>autovacuum_freeze_min_age = 330,
>>autovacuum_freeze_table_age = 33300
>> )
>> TABLESPACE pg_default;
>> 
>> ALTER TABLE public.test
>>OWNER to thom;
>> GRANT ALL ON TABLE public.test TO thom;
>> 
>> 
>> COMMENT ON TABLE public.test
>>IS 'This is just a test table';
>> 
>> COMMENT ON COLUMN public.test.id
>>IS 'the main ID';
>> 
>> ALTER TABLE public.test
>>ALTER COLUMN id
>>SET (n_distinct='0.2');
>> COMMENT ON CONSTRAINT pk ON public.test
>>IS 'primary key test'
>> 
>> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
>> none before the COMMENT ON CONSTRAINT line.
>> 
>> This SQL fails because collations aren't allowed on integer columns,
>> and the DEFAULT value for the column named stuff doesn't quote it as a
>> string literal, so it's looking for a column called "hello".
>> 
>> There's also no way to view the autovacuum options I defined other
>> than the SQL pane.
> 
> A couple more:
> 
> If I go to create a new table, give it a name, select a table to
> inherit from, and then do nothing else, I get an error:
> 
> ERROR: syntax error at or near "INHERITS"
> LINE 2: INHERITS (test)
> ^
> 
> This is because no column list was provided, and in this case, an
> empty one would be needed.  So instead of:
> 
> CREATE TABLE public.test2
> (
> )
>INHERITS (test)
> WITH (
>OIDS = FALSE
> )
> TABLESPACE pg_default;
> 
> It should be:
> 
> CREATE TABLE public.test2
>INHERITS (test)
> WITH (
>OIDS = FALSE
> )
> TABLESPACE pg_default;
> 
> 
> If I go to create another new table, give it a name, and then in the
> Like section on the Advance tab, I select a table, and enable each of
> the With * options, the following SQL is produced:
> 
> CREATE TABLE public.test2
>LIKE public.test
>INCLUDING DEFAULTS
>INCLUDING CONSTRAINTS
>INCLUDING INDEXES
>INCLUDING STORAGE
>INCLUDING COMMENTSWITH (
>OIDS = FALSE
> )
> TABLESPACE pg_default;
> 
> The LIKE statement should appear in the column list section, so should
> be surrounded in parentheses.  Also, the WITH statement here is not on
> a new line.
> 
> 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-04-27 Thread Thom Brown
On 27 April 2016 at 13:43, Thom Brown  wrote:
> On 27 April 2016 at 10:22, Harshal Dhumal
>  wrote:
>>
>> Hi,
>>
>> PFA attached patches for table node and all table child nodes.
>>
>> This patch includes below nodes,
>>
>> 1) Table node  -- Initial patch by Murtuza, 
>> constraints compatibility by Harshal.
>> 2) Column node   -- by Murtuza.
>> 3) Index node  -- by Murtuza.
>> 4) Trigger node-- by Murtuzz.
>> 6) Rules node  -- by Surinder.
>> 7) Constraints nodes:
>>   i]  Index Constraint -- Initial patch by Harshal, 
>> Integration with table node by Murtuza.
>>   ii] Foreign key-- Initial patch and 
>> Integration with table node by Harshal.
>>   iii] Check constraint-- Initial patch and Integration 
>> with table node by Harshal.
>>   iv] Exclusion constraint   -- Initial patch and Integration 
>> with table node by Harshal.
>>
>> Please apply patches in following order as all of them depends on each other.
>>
>> Order:  Table Node > Index constraint ---> remaining patches in any 
>> order.
>>
>>
>
> Nice work.  Here's some initial feedback from a very quick play around.
>
> On the Create table editor, in the Advance tab (which should probably
> be labelled "Advanced"), the Like section should grey out the "With *"
> values if no relation is selected in the drop-down box.
>
> The way primary keys are defined are kinda awkward.  It might be
> useful to provide some kind of checkbox on the initial column list
> that tells it which columns are involved in the primary key, then the
> user could just select which ones they want.  If they want to refine
> it, they could edit it in the Constraints > Primary Key section.
>
> I'm getting weird spacing in the SQL output.  Here's an example:
>
> CREATE UNLOGGED TABLE public.test
> (
> id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
> stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
> CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
> )
> WITH (
> OIDS = TRUE,
> FILLFACTOR = 88,
> autovacuum_enabled = TRUE,
> autovacuum_analyze_scale_factor = 0.33,
> autovacuum_analyze_threshold = 30,
> autovacuum_freeze_max_age = 333,
> autovacuum_vacuum_cost_delay = 30,
> autovacuum_vacuum_cost_limit = 3,
> autovacuum_vacuum_scale_factor = 0.33,
> autovacuum_vacuum_threshold = 33,
> autovacuum_freeze_min_age = 330,
> autovacuum_freeze_table_age = 33300
> )
> TABLESPACE pg_default;
>
> ALTER TABLE public.test
> OWNER to thom;
> GRANT ALL ON TABLE public.test TO thom;
>
>
> COMMENT ON TABLE public.test
> IS 'This is just a test table';
>
> COMMENT ON COLUMN public.test.id
> IS 'the main ID';
>
> ALTER TABLE public.test
> ALTER COLUMN id
> SET (n_distinct='0.2');
> COMMENT ON CONSTRAINT pk ON public.test
> IS 'primary key test'
>
> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
> none before the COMMENT ON CONSTRAINT line.
>
> This SQL fails because collations aren't allowed on integer columns,
> and the DEFAULT value for the column named stuff doesn't quote it as a
> string literal, so it's looking for a column called "hello".
>
> There's also no way to view the autovacuum options I defined other
> than the SQL pane.

A couple more:

If I go to create a new table, give it a name, select a table to
inherit from, and then do nothing else, I get an error:

ERROR: syntax error at or near "INHERITS"
LINE 2: INHERITS (test)
^

This is because no column list was provided, and in this case, an
empty one would be needed.  So instead of:

CREATE TABLE public.test2
(
)
INHERITS (test)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;

It should be:

CREATE TABLE public.test2
INHERITS (test)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;


If I go to create another new table, give it a name, and then in the
Like section on the Advance tab, I select a table, and enable each of
the With * options, the following SQL is produced:

CREATE TABLE public.test2
LIKE public.test
INCLUDING DEFAULTS
INCLUDING CONSTRAINTS
INCLUDING INDEXES
INCLUDING STORAGE
INCLUDING COMMENTSWITH (
OIDS = FALSE
)
TABLESPACE pg_default;

The LIKE statement should appear in the column list section, so should
be surrounded in parentheses.  Also, the WITH statement here is not on
a new line.

So this should be:

CREATE TABLE public.test2
(
LIKE public.test
INCLUDING DEFAULTS
INCLUDING CONSTRAINTS
INCLUDING INDEXES
INCLUDING STORAGE
INCLUDING COMMENTS
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;

Regards

Thom


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make 

Re: [pgadmin-hackers] [PATCH] Tables node (pgAdmin4)

2016-04-27 Thread Thom Brown
On 27 April 2016 at 10:22, Harshal Dhumal
 wrote:
>
> Hi,
>
> PFA attached patches for table node and all table child nodes.
>
> This patch includes below nodes,
>
> 1) Table node  -- Initial patch by Murtuza, 
> constraints compatibility by Harshal.
> 2) Column node   -- by Murtuza.
> 3) Index node  -- by Murtuza.
> 4) Trigger node-- by Murtuzz.
> 6) Rules node  -- by Surinder.
> 7) Constraints nodes:
>   i]  Index Constraint -- Initial patch by Harshal, 
> Integration with table node by Murtuza.
>   ii] Foreign key-- Initial patch and Integration 
> with table node by Harshal.
>   iii] Check constraint-- Initial patch and Integration 
> with table node by Harshal.
>   iv] Exclusion constraint   -- Initial patch and Integration 
> with table node by Harshal.
>
> Please apply patches in following order as all of them depends on each other.
>
> Order:  Table Node > Index constraint ---> remaining patches in any order.
>
>

Nice work.  Here's some initial feedback from a very quick play around.

On the Create table editor, in the Advance tab (which should probably
be labelled "Advanced"), the Like section should grey out the "With *"
values if no relation is selected in the drop-down box.

The way primary keys are defined are kinda awkward.  It might be
useful to provide some kind of checkbox on the initial column list
that tells it which columns are involved in the primary key, then the
user could just select which ones they want.  If they want to refine
it, they could edit it in the Constraints > Primary Key section.

I'm getting weird spacing in the SQL output.  Here's an example:

CREATE UNLOGGED TABLE public.test
(
id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1,
stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello",
CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=33) DEFERRABLE
)
WITH (
OIDS = TRUE,
FILLFACTOR = 88,
autovacuum_enabled = TRUE,
autovacuum_analyze_scale_factor = 0.33,
autovacuum_analyze_threshold = 30,
autovacuum_freeze_max_age = 333,
autovacuum_vacuum_cost_delay = 30,
autovacuum_vacuum_cost_limit = 3,
autovacuum_vacuum_scale_factor = 0.33,
autovacuum_vacuum_threshold = 33,
autovacuum_freeze_min_age = 330,
autovacuum_freeze_table_age = 33300
)
TABLESPACE pg_default;

ALTER TABLE public.test
OWNER to thom;
GRANT ALL ON TABLE public.test TO thom;


COMMENT ON TABLE public.test
IS 'This is just a test table';

COMMENT ON COLUMN public.test.id
IS 'the main ID';

ALTER TABLE public.test
ALTER COLUMN id
SET (n_distinct='0.2');
COMMENT ON CONSTRAINT pk ON public.test
IS 'primary key test'

Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
none before the COMMENT ON CONSTRAINT line.

This SQL fails because collations aren't allowed on integer columns,
and the DEFAULT value for the column named stuff doesn't quote it as a
string literal, so it's looking for a column called "hello".

There's also no way to view the autovacuum options I defined other
than the SQL pane.

Thom


-- 
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] Tables node (pgAdmin4)

2016-04-27 Thread Harshal Dhumal
Hi,

The exclusion constraint has minor validation issue (this won't block
testing of patch). I'm closely working with Ashesh to fix this.

-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Wed, Apr 27, 2016 at 2:52 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA attached patches for table node and all table child nodes.
>
> This patch includes below nodes,
>
> 1) Table node  *-- Initial patch by Murtuza,
> constraints compatibility by Harshal. *
> 2) Column node   *-- by Murtuza. *
> 3) Index node  *-- by Murtuza. *
> 4) Trigger node*-- by Murtuzz. *
> 6) Rules node
> *-- by Surinder.*
> 7) Constraints nodes:
>   i]  Index Constraint *-- Initial patch by Harshal,
> Integration with table node by **Murtuza.*
>   ii] Foreign key*-- Initial patch and
> Integration with table node by Harshal**.*
>   iii] Check constraint*-- Initial patch and
> Integration with table node by Harshal**.*
>   iv] Exclusion constraint   *-- Initial patch and
> Integration with table node by Harshal**.*
>
> Please apply patches in following order as all of them depends on each
> other.
>
>
>
> *Order:  Table Node > Index constraint ---> remaining patches in any
> order.*
>
>
>
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Mon, Apr 18, 2016 at 7:04 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find initial patch for tables node.
>>
>> This patch includes below nodes,
>>
>> 1) Tables node
>> 2) Columns node
>> 3) Index node
>> 4) Trigger node
>> 5) Constraints node (Primary key & Unique constraints only)*-- From:
>> Harshal*
>> 6) Roles node
>>*-- From: Surinder*
>>
>> This patch also includes "VacuumSettings control" required by table node.
>>
>> Please apply Fieldset Control UI patch sent earlier.
>>
>>
>> *Please note that constraint node is still partial, It has Primary Key &
>> Unique constraint working & integrated in tables node.*
>>
>> 1)  I have used initial patch of index constraints node from Harshal &
>> further extend it it to work with table node.
>> [ Harshal will integrate rest of constraints in tables node, he is
>> working on it.]
>>
>> 2) I have also used initial patches of rules node and VacuumSettings
>> control from Surinder & further extend them it to work with table node.
>>
>>
>> --
>> 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
>>
>>
>