Hi Gevik,
Thanks for reporting this.
Dave,
Please find the patch for the same.
Gevik Babakhani wrote:
PgAdmin crashes when browsing functions that only have a single out
parameters without a default value (BTW default values on out
parameters are not supported anyways)
The problem is in pgFunction.cpp(324).
To replicate the crash:
---------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION out_test_crash_3(OUT integer)
RETURNS integer AS
$BODY$
begin
$1 = 1000;
end;
$BODY$
LANGUAGE 'plpgsql'
--------------------------------------------------------------------------
Then:
Refresh the function node in the tree and click on the function name
above.
Possibe fix:
Included.
--
Regards,
Gevik
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: http://www.enterprisedb.com
Index: schema/pgFunction.cpp
===================================================================
--- schema/pgFunction.cpp (revision 7881)
+++ schema/pgFunction.cpp (working copy)
@@ -321,7 +321,7 @@
// Parameter default value
if (GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS) || GetConnection()->BackendMinimumVersion(8, 4))
{
- if (!argDefsArray.Item(i).IsEmpty())
+ if (!argModesArray.Item(i).IsSameAs(wxT("OUT"), false) && !argDefsArray.Item(i).IsEmpty())
arg += wxT(" DEFAULT ") + argDefsArray.Item(i);
}
Index: schema/edbPackageFunction.cpp
===================================================================
--- schema/edbPackageFunction.cpp (revision 7881)
+++ schema/edbPackageFunction.cpp (working copy)
@@ -92,7 +92,7 @@
// Parameter default value
if (GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS) || GetConnection()->BackendMinimumVersion(8, 4))
{
- if (!argDefsArray.Item(i).IsEmpty())
+ if (!argModesArray.Item(i).IsSameAs(wxT("OUT"), false) && !argDefsArray.Item(i).IsEmpty())
arg += wxT(" DEFAULT ") + argDefsArray.Item(i);
}
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers