Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bk7M2-00027Q-Bk for pgadmin-hackers@arkaria.postgresql.org; Wed, 14 Sep 2016 10:23:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bk7M1-0008OR-UI for pgadmin-hackers@arkaria.postgresql.org; Wed, 14 Sep 2016 10:23:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bk7M1-0008NH-9O for pgadmin-hackers@postgresql.org; Wed, 14 Sep 2016 10:23:45 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bk7Ly-0001qt-19 for pgadmin-hackers@postgresql.org; Wed, 14 Sep 2016 10:23:44 +0000 Received: by mail-wm0-x235.google.com with SMTP id b187so39384015wme.1 for ; Wed, 14 Sep 2016 03:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=O18D9MySpswIG0rxhbF3FN2NIWTz74m4d4zxlehI7CQ=; b=qQicuZeLYCFirllezENeB/lETv6ehCuFkL9eeM5znH5fQbPhjDSA/dG9Y/0WtcI4KU HQTs5BRfgnOWDSLfZ/fmw89Ouunozf9j/xVDVDZUgTs/UW9Phgy+hlKZ3eNfyjFfK9Et ygnENjYEXWeWJw2gtkjIDJ1e7t6GVWQWxCJU6gTD0wrx/n405m2JmGG5WHM5Rb7WqnNQ 8ZrNy6ykF/iaAQSu7gzudqD+ijmFxPu/SRN8Wlo3wedZbBUpLay8UoC+G7kcNPNuhZ2l 84mgoNgOh4HoryyjNE/P1iP1x3CnBCJZoGwv5jAtX4elYrV8nT+TS0MC0LE5BI95sAGu nbUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=O18D9MySpswIG0rxhbF3FN2NIWTz74m4d4zxlehI7CQ=; b=N7YolkzVddrrNDDtSpXqUF+9K4MNjxLB8JAsp8cPWj7VMBnfQSopbg/gf5HtJ0Dhl+ MLKTfshzSLtA0NSPxRTUufDA0wdHfno7k/+qK7BOYIPn2Gwqyf99WBTV8nhRWB3HW/AC S3cSJFX4v/H/ks4aKQdW5NAIow161APPQP4JoreHTv82hfiReB9BujphttDpBr3Rd9gN WuYPci+nhYxpIGOnvvRNYt0t6n2ymnnEhgxnfCYRtYKqBpGFqXVPuqn7oEzoDqxmlp64 TbgXAtGqb2nzLPweQzWYUdMTUnd3iVef1QFf6tBav0/92bf5DRVj1AJe+OWy+3WQi4Fk 6kvQ== X-Gm-Message-State: AE9vXwNLok3CN8qyx+PigntnEQ/AlY1ziMcM1rOHUBJaVFX1h6Y+0DiQ+Bgh7o0QrAwBN2h4D0yXQMKbl6W53Qyh X-Received: by 10.194.2.51 with SMTP id 19mr1922758wjr.37.1473848619776; Wed, 14 Sep 2016 03:23:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.172.198 with HTTP; Wed, 14 Sep 2016 03:23:09 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Wed, 14 Sep 2016 15:53:09 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM1674 - Reverse engineered SQL for functions with default values is incorrect To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=047d7b3a89366f4f76053c751fd9 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --047d7b3a89366f4f76053c751fd9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 3:30 PM, Dave Page wrote: > Thanks - committed with a couple of minor formatting tweaks: > > - Remove the leading space before arguments (e.g. s/, /\r\t/ instead > of s/,/\r\t/) > - Put the first argument on a new line as well. =E2=80=8BIt seems fine except the case when there are no arguments, the clo= sing bracket ends in next line. Is it ok? > > Please double-check I didn't break anything that I've missed! > It doesn't break anything =E2=80=8B.=E2=80=8B > > On Tue, Sep 13, 2016 at 12:41 PM, Surinder Kumar > wrote: > > Hi > > > > Patch with following changes: > > > > 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. > > > > Please review attached patch. > > > > Thanks, > > Surinder Kumar > > > > > > -- > > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgadmin-hackers > > > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --047d7b3a89366f4f76053c751fd9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On = Wed, Sep 14, 2016 at 3:30 PM, Dave Page <dpage@pgadmin.org> = wrote:
Thanks - committed with a couple of minor formatting tweaks:
- Remove the leading space before arguments (e.g. s/, /\r\t/ instead
of s/,/\r\t/)
- Put the first argument on a new line as well.
=E2=80=8BIt seems fine except the c= ase when there are no arguments, the closing bracket ends in next line. Is = it ok?

Please double-check I didn't break anything that I've missed!
It doesn't break anything
=E2=80=8B.=E2=80=8B

On Tue, Sep 13, 2016 at 12:41 PM, Surinder Kumar
<su= rinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Patch with following changes:
>
> 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 go= t 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 func= tion
> Nodes.
>
> Please review attached patch.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
>
http://www.postgresql.org/mailpref/pgadm= in-hackers
>



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

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

--047d7b3a89366f4f76053c751fd9--