Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Read about the columnlist for the UPDATE OF statement of triggers also
Browse files Browse the repository at this point in the history
for PPAS 9.0+.
  • Loading branch information
Sanket Mehta authored and asheshv committed Oct 14, 2014
1 parent 6909e89 commit 50912f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Changes

Date Dev Ver Change details
---------- --- ------ --------------
2014-10-13 AV 1.20.0 Check for the columnlist for the UPDATE OF syntax on
trigger also works with PPAS 9.5+ [Sanket Mehta]
2014-09-27 AV 1.20.0 Proper saving of columns width in the server status
window [Dmitriy Olshevskiy]
2014-09-19 DP 1.20.0 Fix support for triggers with inline code on PPAS
Expand Down
22 changes: 13 additions & 9 deletions pgadmin/schema/pgTrigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ wxString pgTrigger::GetForEach() const

void pgTrigger::ReadColumnDetails()
{
if (!expandedKids && GetLanguage() != wxT("edbspl"))
if (!expandedKids)
{
expandedKids = true;

Expand Down Expand Up @@ -317,7 +317,7 @@ void pgTrigger::ReadColumnDetails()

void pgTrigger::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids && GetLanguage() != wxT("edbspl"))
if (!expandedKids)
{
ReadColumnDetails();

Expand All @@ -326,15 +326,19 @@ void pgTrigger::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pro
// if no browser present, function will not be appended to tree
expandedKids = true;
}
if (triggerFunction)
delete triggerFunction;

// append function here
triggerFunction = functionFactory.AppendFunctions(this, GetSchema(), browser, wxT(
"WHERE pr.oid=") + NumToStr(functionOid) + wxT("::oid\n"));
if (triggerFunction)
if (GetLanguage() != wxT("edbspl"))
{
iSetFunction(triggerFunction->GetQuotedFullIdentifier());
if (triggerFunction)
delete triggerFunction;

// append function here
triggerFunction = functionFactory.AppendFunctions(this, GetSchema(), browser, wxT(
"WHERE pr.oid=") + NumToStr(functionOid) + wxT("::oid\n"));
if (triggerFunction)
{
iSetFunction(triggerFunction->GetQuotedFullIdentifier());
}
}
}

Expand Down

0 comments on commit 50912f5

Please sign in to comment.