Some of the many changes in PostgreSQL 7.3 broke compatibility with OpenACS. Here's a list of incompatibilities I've found so far and how to fix them:
- bitfromint4 and bittoint4 have been dropped in favour of the more comon bit and int4. Fix: replace bitfromin4 with "bit" (including the quotes!) and replace bittoint4 with "int4".
- Type casting has been overhauled. Implicit integer to varchar type casts have become a thing of the past. Fix: create a copy of the declaration of each Pl/PGSQL function that accepts integers in a varchar parameter. Change the type of that parameter in the copy to integer. Perform an explicit cast in the copy and call the original.
- Another type cast casualty is the implicit casting from timestamptz to timestamp. Timestamp (without time zone) has become the default timestamp format. However current_timestamp still returns timestamptz values. Fix: replace timestamp parameters in PL/PGSQL functions with timestamptz.
- The function int_to_tree_key needs a explicit cast as the new "bit" function doesn't accept double precision parameters. The outcome of -2^31 + p_intkey computation is of double precision and needs to be casted to int4 like so:
"bit"(cast (-2^31 + p_intkey as int4))
That is it so far. OpenACS is still not working with PG 7.3. To be continued....
/Bart