Forum OpenACS Q&A: Should I give up on the SPAM module?

Collapse
Posted by Tom Jackson on

I have installed ACS/pg with postgreSQL 7.0beta4. I was having trouble with the absence of the power function and a few trunc functions, but I somehow figured out how to add these back into pg.

Once I got over those hurdles, I ran into more problems: missing functions. I tracked these down to the postgres-pgtcl.sql file. According to the installation instructions, this file was not supposed to be loaded, and I didnt load it at first. After I loaded the functions that would load with the installed procedural languages, I discovered that I also needed the pltcl functions. I managed to get the pltcl.so module compiled and put in the right place, and pg loaded this module correctly. The function missing errors went away, but now I get this error:

Error: Ns_PgExec: result status: 7 message: ERROR: Cannot cast type 'text' to 'reltime'

The file being sourced was: /admin/spam/index.tcl.

Any direction would help greatly.

Collapse
Posted by Ben Adida on
spam isn't working yet... Check out the release notes for beta2 (I'm guessing beta2 is what you downloaded?). Also, postgres-pgtcl should only be loaded with Postgres 6.5, it won't help you with Postgres 7.0.

Remember, ACS/pg is still under development (and the next version will be much much better), so your best bet is to make sure to read up on the bboards and check what's being worked on :)

Collapse
Posted by Lachlan Myers on
I experienced the same problem with PG 7.0b3/ AOLserver3.0b61, Mandrake/RH6, but didn't know enough to fix it. Dataload problems have far-reaching consequences, so I'd recommend logging this process. Anyone with problems might like to look there first.

However, in case you can use the specific information of where the problems arise, here's the errors grepped from the log of the load-data-model.sql. Only the homepage.sql ERRORs seem to be a problem.

psql:homepage.sql:1027: ERROR:  Function 'trunc(int4)' does not exist
psql:homepage.sql:1028: ERROR:  Function 'power(int4, int4)' does not exist
psql:ecommerce-plsql.sql:700: ERROR:  ProcedureCreate: procedure ec_items_reportable_count already exists with same arguments
psql:events.sql:19: NOTICE:  plpgsql: ERROR during compile of administration_subgroup_add near line 54
psql:events.sql:19: ERROR:  parse error at or near ";"
psql:sdm.sql:45: ERROR:  parser: parse error at or near "("

This mainly affects the working of homepages - had these up and running under PG 6.5.3.

Collapse
Posted by Tom Jackson on

I thought that I had posted my fix for the homepage module, but I guess that I didn't. Yesterday I upgraded to the 3.2 version on sourceforge. It is in great shape. I still needed to add a few functions to get the homepage, and other modules to work. Here are the two functions that I added:

drop function power(int4,int4); create function power(int4,int4) returns float8 as ' declare this_power alias for $1; this_base alias for $2; base_as_float float8; power_as_float float8; return_what float8; BEGIN base_as_float := float8(this_base); power_as_float := float8(this_power); return_what := pow(power_as_float,base_as_float); return return_what; END; ' language 'plpgsql'; drop function trunc(int4); create function trunc(int4) returns integer as ' declare my_int alias for $1; BEGIN return my_int ; END; ' language 'plpgsql'; drop function round(int4); create function round(int4) returns integer as ' declare my_int alias for $1; BEGIN return my_int; END; ' language 'plpgsql';

Put these in a file in /doc/sql (with the other datamodel files), and load.