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

Commit

Permalink
Fix renaming and schema changes for stored procedures in PPAS.
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG
  • Loading branch information
Dinesh Kumar authored and dpage committed May 8, 2013
1 parent 79b5749 commit 67078e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -37,6 +37,8 @@ Changes

Date Dev Ver Change details
---------- --- ------ --------------
2013-05-08 DP 1.16.2 Fix renaming and schema changes for stored procedures
in PPAS [Dinesh Kumar].
2013-04-25 DP 1.16.2 Ensure the Query Tool's maximum column length setting
is honoured.
2013-04-22 DP 1.16.2 Handle default privileges to PUBLIC correctly. [Dhiraj
Expand Down
11 changes: 9 additions & 2 deletions pgadmin/dlg/dlgFunction.cpp
Expand Up @@ -892,7 +892,7 @@ wxString dlgFunction::GetSql()
AppendNameChange(sql, wxT("FUNCTION ") + function->GetQuotedFullIdentifier()
+ wxT("(") + function->GetArgSigList() + wxT(")"));
else
AppendNameChange(sql, wxT("FUNCTION ") + function->GetQuotedFullIdentifier());
AppendNameChange(sql, wxT("PROCEDURE ") + function->GetQuotedFullIdentifier());
}
if (didChange)
sql += wxT("CREATE OR REPLACE ") + objType;
Expand Down Expand Up @@ -985,14 +985,21 @@ wxString dlgFunction::GetSql()
}


if (function)
if (function && !isProcedure)
{
name = schema->GetQuotedPrefix() + qtIdent(name)
+ wxT("(") + GetArgs(false, true) + wxT(")");

AppendOwnerChange(sql, wxT("FUNCTION ") + name);
AppendSchemaChange(sql, wxT("FUNCTION ") + name);
}
else if(isProcedure)
{
name = schema->GetQuotedPrefix() + qtIdent(name);
AppendOwnerChange(sql, wxT("PROCEDURE ") + name);
AppendSchemaChange(sql, wxT("PROCEDURE ") + name);
}

else
{
name = name + wxT("(") + GetArgs(false, true) + wxT(")");
Expand Down

0 comments on commit 67078e0

Please sign in to comment.