Hi, The pgAdmin source base is peppered with references to a non-existent "proargdefvals" attribute. The FEATURE_FUNCTION_DEFAULTS feature will not get set because of this ever. This patch replaces the references to this attribute by the valid "proargdefaults" attribute.
Regards, Nikhils
diff --git a/pgadmin/db/pgConn.cpp b/pgadmin/db/pgConn.cpp index 5589b89..b7b1259 100644 --- a/pgadmin/db/pgConn.cpp +++ b/pgadmin/db/pgConn.cpp @@ -517,7 +517,7 @@ bool pgConn::HasFeature(int featureNo, bool forceCheck) } // Check for EDB function parameter default support - wxString hasFuncDefs = ExecuteScalar(wxT("SELECT count(*) FROM pg_attribute WHERE attrelid = 'pg_catalog.pg_proc'::regclass AND attname = 'proargdefvals'")); + wxString hasFuncDefs = ExecuteScalar(wxT("SELECT count(*) FROM pg_attribute WHERE attrelid = 'pg_catalog.pg_proc'::regclass AND attname = 'proargdefaults'")); if (hasFuncDefs == wxT("1")) features[FEATURE_FUNCTION_DEFAULTS] = true; else diff --git a/pgadmin/schema/edbPackageFunction.cpp b/pgadmin/schema/edbPackageFunction.cpp index ed0b692..4abbffc 100644 --- a/pgadmin/schema/edbPackageFunction.cpp +++ b/pgadmin/schema/edbPackageFunction.cpp @@ -189,7 +189,7 @@ edbPackageFunction *edbPackageFunctionFactory::AppendFunctions(pgObject *obj, ed wxString sql, argDefsCol; if (obj->GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS)) - argDefsCol = wxT("proargdefvals, "); + argDefsCol = wxT("proargdefaults, "); if (obj->GetConnection()->EdbMinimumVersion(8, 2)) { @@ -259,7 +259,7 @@ edbPackageFunction *edbPackageFunctionFactory::AppendFunctions(pgObject *obj, ed // Function defaults if (obj->GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS)) { - tmp = packageFunctions->GetVal(wxT("proargdefvals")); + tmp = packageFunctions->GetVal(wxT("proargdefaults")); if (!tmp.IsEmpty()) argDefsTkz.SetString(tmp.Mid(1, tmp.Length() - 2), wxT(",")); } diff --git a/pgadmin/schema/pgFunction.cpp b/pgadmin/schema/pgFunction.cpp index 9f42dbf..a6c52df 100644 --- a/pgadmin/schema/pgFunction.cpp +++ b/pgadmin/schema/pgFunction.cpp @@ -608,7 +608,7 @@ pgFunction *pgFunctionFactory::AppendFunctions(pgObject *obj, pgSchema *schema, if (obj->GetConnection()->BackendMinimumVersion(8, 0)) argNamesCol = wxT("proargnames, "); if (obj->GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS) && !obj->GetConnection()->BackendMinimumVersion(8, 4)) - argDefsCol = wxT("proargdefvals, "); + argDefsCol = wxT("proargdefaults, "); if (obj->GetConnection()->BackendMinimumVersion(8, 4)) argDefsCol = wxT("pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals, pronargdefaults, "); if (obj->GetConnection()->BackendMinimumVersion(8, 3)) @@ -710,7 +710,7 @@ pgFunction *pgFunctionFactory::AppendFunctions(pgObject *obj, pgSchema *schema, if (obj->GetConnection()->HasFeature(FEATURE_FUNCTION_DEFAULTS) && !obj->GetConnection()->BackendMinimumVersion(8, 4)) { - tmp = functions->GetVal(wxT("proargdefvals")); + tmp = functions->GetVal(wxT("proargdefaults")); if (!tmp.IsEmpty()) argDefsTkz.SetString(tmp.Mid(1, tmp.Length() - 2), wxT(",")); }
-- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers