Forum OpenACS Q&A: Re: General Comments Broken?

Collapse
Posted by Richard Hamilton on
It looks as if someone has changed the name of the field package_key to package_id, and the datatype from 'character varying' to 'integer', but has not coded the upgrade script to replace the original function.  I presume therefore that the new function is now choking on the field name change.


public | apm__get_value | character varying | character varying, character varying | stable    | oakmasters | plpgsql  |
                                                                                            |
                  : declare
                  :  get_value__package_key            alias for $1;
                  :  get_value__parameter_name        alias for $2;
                  :  v_parameter_id                    apm_parameter_values.parameter_id%TYPE;
                  :  value                            apm_parameter_values.attr_value%TYPE;
                  : begin
                  :    v_parameter_id := apm__id_for_name (get_value__package_key, get_value__parameter_name);
                  :
                  :    select attr_value into value from apm_parameter_values v
                  :    where v.package_id is null
                  :    and parameter_id = get_value__parameter_id;
                  :
                  :    return value;
                  :
                  : end;


public | apm__get_value | character varying | integer, character varying          | stable    | oakmasters | plpgsql  |
                                                                                          |
                : declare
                :  get_value__package_id            alias for $1;
                :  get_value__parameter_name        alias for $2;
                :  v_parameter_id                    apm_parameter_values.parameter_id%TYPE;
                :  value                            apm_parameter_values.attr_value%TYPE;
                : begin
                :    v_parameter_id := apm__id_for_name (get_value__package_id, get_value__parameter_name);
                :
                :    select attr_value into value from apm_parameter_values v
                :    where v.package_id = get_value__package_id
                :    and parameter_id = get_value__parameter_id;
                :
                :    return value;
                :
                : end;
(2 rows)