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-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][pgAdmin4][Patch]: File Manager & Backform FileControl

2016-04-28 Thread Neel Patel
Hi Surinder,

Please find additional comments as below.

1.  In Windows OS, when we try to open the dialog with default preference
value then it gives error as below.

2016-04-28 13:07:44,716: ERROR  pgadmin:Exception on
/file_manager/filemanager/2530270/ [POST]
Traceback (most recent call last):
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line
1817, in wsgi_app
response = self.full_dispatch_request()
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line
1477, in full_dispatch_request
rv = self.handle_user_exception(e)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line
1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line
1475, in full_dispatch_request
rv = self.dispatch_request()
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask\app.py", line
1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Projects\venv_python_2_7\Lib\site-packages\flask_login.py", line
758, in decorated_view
return func(*args, **kwargs)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py",
line 629, in file_manager
return getattr(myFilemanager, mode)(**kwargs)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py",
line 421, in getfolder
filelist = self.list_filesystem(dir, path, trans_data, file_type)
  File "C:\Projects\pgadmin4\web\pgadmin\misc\file_manager\__init__.py",
line 331, in list_filesystem
for f in sorted(os.listdir(orig_path)):
WindowsError: [Error 161] The specified path is invalid: '//*.*'


2. Folder having write only permission should not allow to read the
directory. Same way read only permission folder should not allow to create
the folder. Currently it gives below error.

   PermissionError: [Errno 13] Permission denied:
'/home/neel/Projects/pgadmin4_file_manager/write_only_premission/'

3. In Windows OS, when we open the file manager dialog, no directories
listed though we have directories in the folder. Due to that we are not
able to
test all the functionality in windows. Once we fix this issue then we
test all the functionality in windows OS.

   We debug the issue and found that issue is with the json response which
includes the HTML tags.

4. In Windows OS, file manager dialog have issue with layout. We are
getting some margin at top before buttons.

5. When we give any special characters to folder name that it gives error
saying "Folder does not exist".
Same is applicable when we give dialog_type to create_file

6. In create_file mode, after giving the filename it should display the
name of the file to text control.

7. In create_file mode, when user gives the filename and click on the any
blank area of dialog then name is getting cleared.

8. When we upload the new file through file manager then it is not showing
in the list though we have selected "All files" options.

9. When we rename the folder in "Table mode" then font-family gets changed.
It is not happened in "Grid" mode.

10. When we try to download the file then it goes into loop and opens up
20-30 dialogs at the same time.

11. "Rename" button is enabled even though we have not selected the
files/folder to rename and when we click on the "Rename" button it gives
below
 error.

TypeError: orig_value is undefined
12. "Delete" button is enabled even though we have not selected the
files/folder to delete and when we click on the "Delete" button it gives
below error.
 TypeError: path is undefined

Do let us know if you have queries.

Thanks,
Neel Patel

On Wed, Apr 27, 2016 at 9:15 PM, Neel Patel 
wrote:

> Hi Surinder,
>
> I have applied the patch file and below are some observations.
>
>- When we create the new folder and hit the enter then we are getting
>the below error.
>
>   TypeError: argument of type 'NoneType' is not iterable
>
>- I have just added the new control in "Import" dialog and observed
>that new control is getting added in new tab called "General". I think it
>should not create the new "General" tab.
>- "Select" and "Cancel" buttons font is different then other dialogs.
>
>
> Thanks,
> Neel Patel
>
> On Wed, Apr 27, 2016 at 6:18 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> The patch is for *File Manager and Backform FileControl*.
>>
>> *File Manager:* It allows user to store their files at one place. The
>> user can set path to this directory in preferences which file manger will
>> use.
>>
>> It will be used by various modules of pgAdmin4 such as
>> *import data from file, query tool, backup & recovery tool* so on.. It
>> allows user to perform various operations such as:
>>
>>- File deletion
>>- File upload
>>- Create new directory
>>- File rename
>>- File download and
>>- List files & folders in list and grid view.
>>
>> *FileContr

[pgadmin-hackers][pgAdmin4][Patch]: Remove default extraclass from the SqlFieldControl

2016-04-28 Thread Surinder Kumar
Hi,

The *SqlFieldControl* is setting default height for textarea, which is not
needed.
It should expand as needed as similar in *SqlTabControl*.

Please find the attached patch, review it.

Thanks
Surinder Kumar


remove_default_height_in_SqlFieldControl.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-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 to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-h

Re: [pgadmin-hackers][pgAdmin4][Patch]: Remove default extraclass from the SqlFieldControl

2016-04-28 Thread Surinder Kumar
Hi,

More specifically to the issue.
I am using SqlFieldControl in View for Definition Field which takes default
height of 300px which is set by Control as default height. but as per
dave's suggestion on thread

http://www.postgresql.org/message-id/ca+ocxozn++8sfqjwjz5qsfbxa7p-47apoholtsotpbk6n5v...@mail.gmail.com

"The Definition box on the View dialogue should start at a single
line and expand as needed - see the Function dialogue".

If user still need some height for control, It can be specified in*
extraclasses[]* parameter which will apply to the specific field.



On Thu, Apr 28, 2016 at 7:02 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> The *SqlFieldControl* is setting default height for textarea, which is
> not needed.
> It should expand as needed as similar in *SqlTabControl*.
>
> Please find the attached patch, review it.
>
> Thanks
> Surinder Kumar
>


[pgadmin-hackers] Minor issues

2016-04-28 Thread Harshal Dhumal
Hi,

PFA patch for minor issues.

Issues fixed:

1] Removed unwanted "{% if  %}" from database 9.1 nodes.sql
2] Fixed issue while removing select2cell fro backgrid.




-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
index 3ce9645..b05880c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
@@ -3,7 +3,7 @@ SELECT
 has_database_privilege(db.oid, 'CREATE') as cancreate, datdba as owner
 FROM
 pg_database db
-LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid{% if did %}
+LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid
 WHERE {% if did %}
 db.oid = {{ did|qtLiteral }}::OID{% else %}
 db.oid > {{ last_system_oid }}::OID
diff --git a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
index 999ac7c..5311a01 100644
--- a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
@@ -530,7 +530,9 @@
 
 remove: function() {
   this.$select.off('change', this.onSave);
-  this.$select.select2('destroy');
+  if (this.$select.data('select2')) {
+this.$select.select2('destroy');
+  }
   this.$el.empty();
   Backgrid.SelectCell.prototype.remove.apply(this, arguments);
  }

-- 
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] Minor issues

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



EenterpriseDB 

On Fri, Apr 29, 2016 at 11:52 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for minor issues.
>
> Issues fixed:
>
> 1] Removed unwanted "{% if  %}" from database 9.1 nodes.sql
> 2] Fixed issue while removing select2cell fro backgrid.
>

Regarding select2 cell; Even though we have created select2 cell sometimes
we do not get select2 instance when we retrieve it from dom. So we have to
manually check it's data attribute before calling it's destroy method.


>
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>


Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Foreign Table Module

2016-04-28 Thread Neel Patel
Hi Khushboo,

Below are the observations.

   - When we create the new Foreign Table with column name and types then
   it shows NULL along with column name and type in properties tab.

 e.g. column_1 xml[] NULL

   - Once we inherits the table from another table then column and another
   parameters of inherited table should not allowed to change.
   - When we create any foreign table then same foreign table is also
   listed under "Tables" node.
   - SQL is not generated properly. Please find below SQL which gives error
   during execution.

   CREATE FOREIGN TABLE public.test_2
   (id1 integer NOT NULL DEFAULT12 COLLATEpg_catalog."POSIX")
   SERVER fsrv;

   - When we create the new foreign table with security label then no SQL
   is generated for security label.
   - In Edit mode, when we provide security label with both value
   "provider" and "security label" then security label is displayed NULL

e.g.  SECURITY LABEL FOR frgn_table ON FOREIGN TABLE
public.fsrv_table IS NULL;

   - During creation of the column, when we remove the collation then it
   gives below error.

   TypeError: item is undefined

   - Delete/Drop cascade functionality is not working, we are getting below
   error.

   TypeError: self.canDrop.apply is not a function

   - When we edit the foreign table and try to remove the existing "Data
   Type" of column then it gives below error.

  TypeError: this.dataAdapter is null

   - Create the new foreign table and click on ADD button in Column tab and
   do not provide any column name and data type. Need to do proper validation
   in Column tab for all parameters. Currently if user do not provide any
   value then wrong SQL is getting generated.

   CREATE FOREIGN TABLE public.test_4
   (None None NULL)
  SERVER test_fsrv;

   - When we do not provide the Check parameters in constraint then it
   gives SQL syntax error.

   CREATE FOREIGN TABLE public.test_5
   ()
   SERVER test_fsrv;

  ALTER FOREIGN TABLE public.test_5
  ADD CONSTRAINT test CHECK () NOT VALID;

   - If we edit foreign table and change the schema then it gives below
   error.

  IndexError: list index out of range

   - We should have proper indentation in the SQL tab once we give the
   parameters. Currently it looks like below for "Options" value.

CREATE FOREIGN TABLE "1_test"."5_test"
()
SERVER asas
OPTIONS (test1 'test2'
, test3 'test4');

   - If user provide foreign table name and do not provide foreign server
   and click on SQL tab then we are getting error on browser side as below. We
   should have proper error handling in this case.

 Couldn't find the required parameter (ftsrvname).

   - Create the foreign table, add the constraint and do not provide any
   constraint information then SQL generated is wrong.

   CREATE FOREIGN TABLE "1_test"."9_test"
   ()
   SERVER test_fsrv;

  ALTER FOREIGN TABLE "1_test"."9_test"
  ADD CONSTRAINT None CHECK ();

   - When we click on the foreign table collection node then "Comment"
   column is blank even though we have comment in the foreign table.
   - Create the foreign table on PG 9.1 and after pressing Save button we
   are getting below error.

"the JSON object must be str, not 'list'"

   - When we delete the options parameters then it gives SQL error because
   DROP statement does not include the value.

  ALTER FOREIGN TABLE public.test_12
  OPTIONS ( DROP ser2 'val2');

   - There are some new functionality added in PG 9.5. Do we really need to
   implement ? Need to discuss with Dave/Ashesh. Below are the new
   functionality.

   - In create foreign table,we have added column constraint
but "table constraint" is added from 9.5.Do we really require to add table
constraint ?
   - In alter foreign table, below are the new functionality
added.
 1.  ALTER [ COLUMN ] column_name SET STORAGE { PLAIN |
EXTERNAL | EXTENDED | MAIN }
 2.  DISABLE TRIGGER [ trigger_name | ALL | USER ]
 3.  ENABLE TRIGGER [ trigger_name | ALL | USER ]
 4.  ENABLE REPLICA TRIGGER trigger_name
 5.  ENABLE ALWAYS TRIGGER trigger_name
 6.  SET WITH OIDS
 7.  SET WITHOUT OIDS

Do let us know in case of any queries.

Thanks,
Neel Patel

On Tue, Apr 5, 2016 at 2:27 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find updated patch for the Foreign Table Module.
>
> This patch is dependent on
> 1. Backgrid Depscell Patch, (submitted by me)
> 2. NodeAjaxOptionsCell Transform change patch, on which Ashesh and Murtuza
> are working
>
> Thanks,
> Khushboo
>
>
>