Hi,

Consider the following PPAS 9.0 function:

CREATE OR REPLACE FUNCTION TEST_in_inout_out(A IN INT, B IN OUT INT, C  OUT
INT)  RETURN INT
IS
    D INT;
BEGIN
    D := A + B + C;
    RETURN D;
END;

When I click on properties and try to assign a comment to this function, it
errors out. In PPAS 9.0, either we do not provide the OUT parameter while
assigning the comment or if we are mentioning it, we need to provide the
argument type (OUT, INOUT etc.) appropriately. Fixing via the latter route.

PFA, patch for the same.

Regards,
Nikhils
diff --git a/pgadmin/dlg/dlgFunction.cpp b/pgadmin/dlg/dlgFunction.cpp
index 95aa095..ae6cfc0 100644
--- a/pgadmin/dlg/dlgFunction.cpp
+++ b/pgadmin/dlg/dlgFunction.cpp
@@ -796,7 +796,9 @@ wxString dlgFunction::GetArgs(const bool withNames, const bool inOnly)
 				args += qtIdent(lstArguments->GetText(i, 2)) + wxT(" ");
 
 			// edbspl functions should list OUT params, but only by type.
-			if (!inOnly || !isEdbspl || lstArguments->GetText(i, 1) != wxT("OUT"))
+			// although this is not true for EDB AS90 onwards..
+			if (!inOnly || !isEdbspl || lstArguments->GetText(i, 1) != wxT("OUT") ||
+										 connection->EdbMinimumVersion(9, 0))
 			{
 				if (lstArguments->GetText(i, 1) != wxEmptyString)
 					args += lstArguments->GetText(i, 1) + wxT(" ");
@@ -807,7 +809,9 @@ wxString dlgFunction::GetArgs(const bool withNames, const bool inOnly)
 		else
 		{
 			// edbspl functions should list OUT params, but only by type.
-			if (!inOnly || !isEdbspl || lstArguments->GetText(i, 1) != wxT("OUT"))
+			// although this is not true for EDB AS90 onwards..
+			if (!inOnly || !isEdbspl || lstArguments->GetText(i, 1) != wxT("OUT") ||
+									connection->EdbMinimumVersion(9,0))
 			{
 				if (connection->BackendMinimumVersion(8, 1) && lstArguments->GetText(i, 1) != wxEmptyString)
 					args += lstArguments->GetText(i, 1) + wxT(" ");
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to