public inbox for [email protected]  
help / color / mirror / Atom feed
From: Akshay Joshi <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: RM-2519: Show the trigger function under the trigger node.
Date: Fri, 9 Oct 2020 14:28:09 +0530
Message-ID: <CANxoLDfzDL9w6QYxphZG-PDFj=pQ3bB3kO+SY9sDC-YvegckAA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcgcya2cSO-axRTJwKnBV1DVTLUYJiiYTKR_6M+nC6amw@mail.gmail.com>
References: <CANxoLDfHPBsNr_cPVBt+ua0=HNh9gn95VHPoo8C7RskCmCjmZw@mail.gmail.com>
	<CA+OCxoy4kMaMAiQFW+PN2WMUBj14i4yLqsG_oi4c8KFW=g+DOQ@mail.gmail.com>
	<CANxoLDcgcya2cSO-axRTJwKnBV1DVTLUYJiiYTKR_6M+nC6amw@mail.gmail.com>

Hi Dave/Team

On Thu, Oct 8, 2020 at 10:17 PM Akshay Joshi <[email protected]>
wrote:

>
>
> On Thu, 8 Oct, 2020, 20:22 Dave Page, <[email protected]> wrote:
>
>> Hi Akshay,
>>
>> On Thu, Oct 8, 2020 at 3:43 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Hi Dave/Team
>>>
>>> I have started working on RM #2519 to show the trigger function under
>>> the trigger node. I have made the changes to the code and the trigger
>>> function is visible under the respective trigger node.
>>>
>>> Changes made to achieve this:
>>>
>>>    - If the trigger function is in the same schema then it works
>>>    absolutely fine, the user can update the properties, view the SQL,
>>>    Statistics, Dependencies, and Dependents.
>>>    - If the trigger function is from the other schema then we need to
>>>    change the schema id as we have a strict API route which adds the schema id
>>>    where the trigger exists. Change has been done and it works.
>>>    - For the trigger function from the other schema, I have added the
>>>    schema-qualified name.
>>>    - Remove the menu options and add a dummy menu "No menu is available
>>>    for this object" when the user selects the trigger function under the
>>>    trigger node. Have to do this because of the different API routes, as the
>>>    object is not available and personally, I feel we should not show the
>>>    context menu to create, delete, drop from there.
>>>
>>> *Note:* To remove the menu option completely I have modified the
>>> *menu.js* and check if the 'showMenu' function is defined. If it is
>>> defined then call that function and based on the return value, will make
>>> the decision.
>>>
>>> Please refer to the below screenshot for more clarity:
>>>         [image: 2519.png]
>>>
>>> Thought/Suggestion?
>>>
>>
>> Yeah, we should not be able to create/drop there, as the trigger must
>> have the function anyway (you can't define a trigger without a function in
>> PG, nor can you drop a function that's being used by a trigger).
>>
>> However, we should have a working Properties option I would say.
>>
>
>     Yes, it is working from properties tab. User can edit from there.
>

        I have tested it today and it works perfectly fine if the trigger
function is in the same schema, but if we edit properties of the trigger
function from another schema eventually that object is updated properly,
but it is not visible under the trigger node. The user needs to refresh the
trigger node to make it visible again. I am checking it how we can fix this
but not found any solution yet.

>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


Attachments:

  [image/png] 2519.png (272.4K, 3-2519.png)
  download | view image

view thread (9+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: RM-2519: Show the trigger function under the trigger node.
  In-Reply-To: <CANxoLDfzDL9w6QYxphZG-PDFj=pQ3bB3kO+SY9sDC-YvegckAA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox