pgAdmin 4 commit: Fix function signature generation for reverse enginee

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin 4 commit: Fix function signature generation for reverse enginee
Date: 2016-09-14 09:59:14
Message-ID: E1bk6yI-0004gW-TN@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)kumar(at)enterprisedb(dot)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(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-09-14 10:00:45 Re: [pgAdmin4][Patch]: RM1674 - Reverse engineered SQL for functions with default values is incorrect
Previous Message Dave Page 2016-09-14 09:43:18 Re: PATCH: To fix the issue of Table node (pgAdmin4)