Re: [pgAdmin4][Patch]: RM1674 - Reverse engineered SQL for functions with default values is incorrect

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: RM1674 - Reverse engineered SQL for functions with default values is incorrect
Date: 2016-09-14 10:25:44
Message-ID: CA+OCxoxa=Sw2q81+RJiaWnsYoqqD2Yu4H2Oy8f_5+E3_pZ79bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Wed, Sep 14, 2016 at 11:23 AM, Surinder Kumar
<surinder(dot)kumar(at)enterprisedb(dot)com> wrote:
> On Wed, Sep 14, 2016 at 3:30 PM, Dave Page <dpage(at)pgadmin(dot)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.
>
> It seems fine except the case when there are no arguments, the closing
> bracket ends in next line. Is it ok?

I'm not overly upset by it :-). If it irks you, feel free to change it!

>>
>>
>> Please double-check I didn't break anything that I've missed!
>
> It doesn't break anything

Cool, thanks.

>>
>> On Tue, Sep 13, 2016 at 12:41 PM, Surinder Kumar
>> <surinder(dot)kumar(at)enterprisedb(dot)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 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(at)postgresql(dot)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
>
>

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Murtuza Zabuawala 2016-09-14 10:48:12 PATCH: To fix condition checking (pgAdmin4)
Previous Message Dave Page 2016-09-14 10:23:23 Re: PATCH: Fixes issue where executing a query disables the Save button in the query tool (pgAdmin4)