[pgAdmin4][Patch] - RM 3505 Incorrect SQL generated for tables created using inherited columns

2019-01-10 Thread Akshay Joshi
Hi Hackers,

Attached is the patch to fix RM #3505 Incorrect SQL generated for tables
created using inherited columns.

Please review it.

-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql
index 8ea1b762..82501a91 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql
@@ -41,10 +41,10 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
 {### Add columns ###}
 {% if data.columns and data.columns|length > 0 %}
 {% for c in data.columns %}
-{% if c.name and c.cltype %}
-{% if loop.index != 1 %},
-{% endif %}
+{% if c.name and c.cltype and not c.inheritedfrom %}
 {{conn|qtIdent(c.name)}} {% if is_sql %}{{c.displaytypname}}{% else %}{{ GET_TYPE.CREATE_TYPE_SQL(conn, c.cltype, c.attlen, c.attprecision, c.hasSqrBracket) }}{% endif %}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.attnotnull %} NOT NULL{% endif %}{% if c.defval %} DEFAULT {{c.defval}}{% endif %}
+{% if not loop.last %},
+{% endif %}
 {% endif %}
 {% endfor %}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/sql.sql
deleted file mode 100644
index 17b35aed..
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/sql.sql
+++ /dev/null
@@ -1 +0,0 @@
-TAKE ASHESH'S HELP ON THIS TASK :-)
\ No newline at end of file
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/gpdb_5.0_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/gpdb_5.0_plus/create.sql
index 61e4e1e1..c82e72cc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/gpdb_5.0_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/gpdb_5.0_plus/create.sql
@@ -41,10 +41,10 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
 {### Add columns ###}
 {% if data.columns and data.columns|length > 0 %}
 {% for c in data.columns %}
-{% if c.name and c.cltype %}
-{% if loop.index != 1 %},
-{% endif %}
+{% if c.name and c.cltype and not c.inheritedfrom %}
 {{conn|qtIdent(c.name)}} {% if is_sql %}{{c.displaytypname}}{% else %}{{ GET_TYPE.CREATE_TYPE_SQL(conn, c.cltype, c.attlen, c.attprecision, c.hasSqrBracket) }}{% endif %}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.attnotnull %} NOT NULL{% endif %}{% if c.defval %} DEFAULT {{c.defval}}{% endif %}
+{% if not loop.last %},
+{% endif %}
 {% endif %}
 {% endfor %}
 {% endif %}


Re: pgAdmin4 v4.0 candidate builds

2019-01-10 Thread Fahar Abbas
Hi Akshay,

One round of testing has been completed for pgAdmin4 4.0 Release.

Can you please push it for the release?

Kind Regards,


On Tue, Jan 8, 2019 at 5:58 PM Akshay Joshi 
wrote:

> Hi All
>
> We have rewrap the installers as we fixed RM #3856. New candidate builds and
> source can be found at https://developer.pgadmin.org/builds/2019-01-08-1
>
> On Mon, Jan 7, 2019 at 5:57 PM Akshay Joshi 
> wrote:
>
>> Hi All,
>>
>> pgAdmin4 v4.0 candidate builds and source can be found at
>> https://developer.pgadmin.org/builds/2019-01-07-1
>>
>> Fahar, can you please verify it for release on Thursday.
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: *live:fahar.abbas*
Website: www.enterprisedb.com


pgAdmin 4 commit: Fix Jasmine tests.

2019-01-10 Thread Dave Page
Fix Jasmine tests.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a8167f0a729f4a61d3174193e324952959deb32e
Author: Aditya Toshniwal 

Modified Files
--
web/regression/javascript/backup/backup_dialog_wrapper_spec.js   | 4 ++--
web/regression/javascript/restore/restore_dialog_wrapper_spec.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)



Re: [pgAdmin4][patch] Fixes Backup Restore Dialog Postgres help

2019-01-10 Thread Dave Page
Thanks - applied.

On Thu, Jan 10, 2019 at 12:35 PM Aditya Toshniwal
 wrote:
>
> Hi Hackers,
>
> Attached is the patch to fix jasmine test cases failures.
> Kindly review.
>
> On Thu, Jan 10, 2019 at 11:21 AM Dave Page  wrote:
>>
>> Thanks, applied.
>>
>> On Wed, Jan 9, 2019 at 6:31 PM Aditya Toshniwal
>>  wrote:
>> >
>> > Hi Hackers,
>> >
>> > Attached is a tiny patch to fix the Postgres help for backup and restore 
>> > dialog.
>> >
>> > --
>> > Thanks and Regards,
>> > Aditya Toshniwal
>> > Software Engineer | EnterpriseDB Software Solutions | Pune
>> > "Don't Complain about Heat, Plant a tree"
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"



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

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



Jenkins build is back to normal : pgadmin4-master-python36 #854

2019-01-10 Thread pgAdmin 4 Jenkins
See 





Jenkins build is back to normal : pgadmin4-master-python34 #852

2019-01-10 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 commit: Fix ordering of VACUUM options which changed in PG11.

2019-01-10 Thread Dave Page
Fix ordering of VACUUM options which changed in PG11. Fixes #3836

While we're at it, fix the JSON handling in the maintenance/backup/restore 
routes.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8fb340d23b00646e8bd5cdcbab11442b03bfa701
Author: Akshay Joshi 

Modified Files
--
docs/en_US/release_notes_4_1.rst| 1 +
web/pgadmin/tools/backup/__init__.py| 4 +---
web/pgadmin/tools/maintenance/__init__.py   | 4 +---
web/pgadmin/tools/maintenance/templates/maintenance/sql/command.sql | 2 +-
web/pgadmin/tools/restore/__init__.py   | 4 +---
5 files changed, 5 insertions(+), 10 deletions(-)



Re: [pgAdmin4][Patch] - RM 3836 VACUUM FULL FREEZE ANALYZE VERBOSE syntax error on PostgreSQL 11

2019-01-10 Thread Dave Page
Thanks - applied!

On Thu, Jan 10, 2019 at 12:48 PM Akshay Joshi 
wrote:

> Hi
>
> Attached is the modified patch. I have fixed the similar code for Backup
> and Restore as well along with this patch.
>
> On Thu, Jan 10, 2019 at 12:26 PM Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Jan 9, 2019 at 6:46 PM Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to fix RM #3836 VACUUM FULL FREEZE ANALYZE VERBOSE
>>> syntax error on PostgreSQL 11. Order of commands has been changed in
>>> PostgreSQL 11 "https://github.com/postgres/postgres
>>> /commit/921059bd66c7fb1230c705d3b1a65940800c4cbb"
>>>
>>> Please review it.
>>>
>>
>> I tried to test this, and got what looks like the same issue that we
>> looked at the other day with Import/Export. Can you look at it please?
>>
>> 2019-01-10 12:25:02,044: INFO werkzeug: 127.0.0.1 - - [10/Jan/2019
>> 12:25:02] "POST /maintenance/job/2/12669 HTTP/1.1" 500 -
>> 2019-01-10 12:25:02,051: ERROR werkzeug: Error on request:
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py",
>> line 270, in run_wsgi
>> execute(self.server.app)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/werkzeug/serving.py",
>> line 258, in execute
>> application_iter = app(environ, start_response)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1997, in __call__
>> return self.wsgi_app(environ, start_response)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1985, in wsgi_app
>> response = self.handle_exception(e)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1540, in handle_exception
>> reraise(exc_type, exc_value, tb)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py",
>> line 33, in reraise
>> raise value
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1982, in wsgi_app
>> response = self.full_dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1614, in full_dispatch_request
>> rv = self.handle_user_exception(e)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1517, in handle_user_exception
>> reraise(exc_type, exc_value, tb)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/_compat.py",
>> line 33, in reraise
>> raise value
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1612, in full_dispatch_request
>> rv = self.dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask/app.py",
>> line 1598, in dispatch_request
>> return self.view_functions[rule.endpoint](**req.view_args)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/flask_login.py",
>> line 792, in decorated_view
>> return func(*args, **kwargs)
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/tools/maintenance/__init__.py", line
>> 179, in create_maintenance_job
>> data = json.loads(data['data'][0], encoding='utf-8')
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/simplejson/__init__.py",
>> line 535, in loads
>> return cls(encoding=encoding, **kw).decode(s)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/simplejson/decoder.py",
>> line 370, in decode
>> obj, end = self.raw_decode(s)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/simplejson/decoder.py",
>> line 400, in raw_decode
>> return self.scan_once(s, idx=_w(s, idx).end())
>> simplejson.errors.JSONDecodeError: Expecting property name enclosed in
>> double quotes or '}': line 1 column 2 (char 1)
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


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

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


Jenkins build is back to normal : pgadmin4-master-python35 #850

2019-01-10 Thread pgAdmin 4 Jenkins
See 





Jenkins build is back to normal : pgadmin4-master-python27 #864

2019-01-10 Thread pgAdmin 4 Jenkins
See 





Jenkins build is back to normal : pgadmin4-master-python37 #97

2019-01-10 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 v4.0 released

2019-01-10 Thread Akshay Joshi
The pgAdmin Development Team are pleased to announce pgAdmin 4 version 4.0.
This release of pgAdmin 4 includes over 26 bug fixes and new features. For
more details please see the release notes at:

https://www.pgadmin.org/docs/pgadmin4/dev/release_notes_4_0.html.

pgAdmin is the leading Open Source graphical management tool for
PostgreSQL. For more information, please see:

https://www.pgadmin.org/

Notable changes in this release include:

* Slick new UI design.
* Allow query plans to be downloaded as an SVG file.
* Allow servers to be pre-loaded into container deployments

Builds for Windows and macOS are available now, along with a Python Wheel,
Docker Container and source code tarball from:

https://www.pgadmin.org/download/

RPM and DEB packages are expected to be available on the postgresql.org
repositories within the next few days.

--
Akshay Joshi
pgAdmin Project


pgAdmin 4 commit: Tag REL-4_0 has been created.

2019-01-10 Thread Akshay Joshi
Tag REL-4_0 has been created.
View: https://git.postgresql.org/gitweb?p=pgadmin4.git;a=tag;h=refs/tags/REL-4_0

Log Message
---
Tag v4.0

[pgAdmin4][patch] SQL_ASCII database related codec fix

2019-01-10 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to make SQL_ASCII database handling on pgAdmin more
robust.
Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


sqlascii.fix.patch
Description: Binary data