Forum OpenACS Development: Re: HEADache ...

4: Re: HEADache ... (response to 3)
Posted by Matthew Walker on
In PG 7.3 they have redefined the return type for trigger functions from 'OPAQUE' to 'TRIGGER'. They do this automagically for new functions but it seems that when 'create or replace function' is used in 7.3 with a return type of opaque it doesn't like it because it thinks you are trying to redefine the return type of the existing function (which it automagically changed from opaque to trigger).

The solution for 7.3 currently is to change the return type to trigger for the two trigger functions (membership_rels_in_tr and composition_rels_in_tr) that are replaced in acs-kernel/sql/postgresql/groups-body-create.sql (these are originally created in acs-kernel/sql/postgresql/groups-create.sql as placeholders). The problem is this then won't work in PG 7.1 or 7.2.