pgAdmin 4 commit: Fix function signature generation for reverse enginee - Mailing list pgadmin-hackers

From Dave Page
Subject pgAdmin 4 commit: Fix function signature generation for reverse enginee
Date
Msg-id E1bk6yI-0004gW-TN@gothos.postgresql.org
Whole thread Raw
List pgadmin-hackers
Fix function signature generation for reverse engineered SQL. Fixes #1674

1) In SQL pane, the signature in comments had arguments with name and type, Now it will show arguments with type only.

2) There is no indent+newline between arguments (there isn't even a space). - Fixed

3) The default value for the last argument is omitted. - Fixed
Last argument is omitted because the value for the last argument we got from table is empty.
Now we form function signature in the get_definition.sql using 'pg_catalog.pg_get_function_arguments' method.

Above changes will reflect in Functions, Procedures & Trigger function Nodes.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f2469d113c97b8d2f434af54fa76d0195af2f468
Author: Surinder Kumar <surinder.kumar@enterprisedb.com>

Modified Files
--------------
.../databases/schemas/functions/__init__.py        | 61 +++++++++++++++++-----
.../templates/function/pg/sql/9.1_plus/create.sql  |  4 ++
.../function/pg/sql/9.1_plus/get_definition.sql    |  3 +-
.../templates/function/pg/sql/9.2_plus/create.sql  |  4 ++
.../function/pg/sql/9.2_plus/get_definition.sql    |  3 +-
.../templates/function/pg/sql/9.5_plus/create.sql  |  6 ++-
.../function/pg/sql/9.5_plus/get_definition.sql    |  3 +-
.../function/ppas/sql/9.1_plus/create.sql          |  4 ++
.../function/ppas/sql/9.1_plus/get_definition.sql  |  3 +-
.../function/ppas/sql/9.2_plus/create.sql          |  4 ++
.../function/ppas/sql/9.2_plus/get_definition.sql  |  3 +-
.../function/ppas/sql/9.5_plus/create.sql          |  4 ++
.../function/ppas/sql/9.5_plus/get_definition.sql  |  3 +-
.../procedure/ppas/sql/9.1_plus/create.sql         |  7 ++-
.../procedure/ppas/sql/9.1_plus/get_definition.sql |  4 +-
.../procedure/ppas/sql/9.2_plus/create.sql         |  7 ++-
.../procedure/ppas/sql/9.2_plus/get_definition.sql |  4 +-
.../procedure/ppas/sql/9.5_plus/create.sql         |  4 ++
.../procedure/ppas/sql/9.5_plus/get_definition.sql |  4 +-
.../pg/sql/9.1_plus/get_definition.sql             |  3 +-
.../pg/sql/9.2_plus/get_definition.sql             |  3 +-
.../pg/sql/9.5_plus/get_definition.sql             |  3 +-
.../ppas/sql/9.1_plus/get_definition.sql           |  3 +-
.../ppas/sql/9.2_plus/get_definition.sql           |  3 +-
.../ppas/sql/9.5_plus/get_definition.sql           |  3 +-
25 files changed, 120 insertions(+), 33 deletions(-)


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: PATCH: To fix the issue of Table node (pgAdmin4)
Next
From: Dave Page
Date:
Subject: Re: [pgAdmin4][Patch]: RM1674 - Reverse engineered SQL for functions with default values is incorrect