Forum OpenACS Q&A: Re: Package ACS Events Installation Error

Collapse
Posted by Ricardo Jorge on
OK, here is the fix for ACS Events to work with PostgreSQL ( PG ) 8.1

The fix was made available with the great help from Michael Steigman.

======= First ==============

declare
get_html_p__event_id alias for $1; -- in acs_events.event_id%TYPE
v_html_p acs_events.html_p%TYPE;
begin
select coalesce(e.html_p, a.html_p) into v_html_p
from acs_events e
left join acs_activities a
on (e.activity_id = a.activity_id)
where e.event_id = get_html_p__event_id

return v_html_p;

end;' language 'plpgsql';

becomes =========>

declare
get_html_p__event_id alias for $1; -- in acs_events.event_id%TYPE
v_html_p acs_events.html_p%TYPE;
begin
select coalesce(e.html_p, a.html_p) into v_html_p
from acs_events e
left join acs_activities a
on (e.activity_id = a.activity_id)
where e.event_id = get_html_p__event_id; ( missing ";" )

return v_html_p;

end;' language 'plpgsql';
============================

======== Second ============

declare
get_status_summary__event_id alias for $1; -- acs_events.event_id%TYPE
v_status_summary acs_events.status_summary%TYPE;
begin
select coalesce(e.status_summary, a.status_summary) into v_status_summary
from acs_events e
left join acs_activities a
on (e.activity_id = a.activity_id)
where e.event_id = get_status_summary__event_id

return v_status_summary;

end;' language 'plpgsql';

becomes =========>

declare
get_status_summary__event_id alias for $1; -- acs_events.event_id%TYPE
v_status_summary acs_events.status_summary%TYPE;
begin
select coalesce(e.status_summary, a.status_summary) into v_status_summary
from acs_events e
left join acs_activities a
on (e.activity_id = a.activity_id)
where e.event_id = get_status_summary__event_id; ( missing ";" )

return v_status_summary;

end;' language 'plpgsql';
============================

So, this *all* you need to make ACS Events work with PG 8.1

Thanks Ricardo Jorge

Collapse
Posted by Stan Kaufman on
Weird. Those typos (missing semicolons) don't cause installation problems with PG 8.0.x. Regardless, I've commited the fix to oacs-5-2.

However, I gather from what people like Don have said, that you're going to run into trouble with PG 8.1 at other points with other packages because of the toolkit's use of tree_sortkeys and changes in how PG implements things in 8.1 compared to 8.0. Perhaps some other issues too. But it's not merely a problem with two missing semicolons in one create sql script.

See https://openacs.org/forums/message-view?message_id=365242.