SA Bugzilla – Bug 4675
spamassassin: syntax error message from bayes_pg.sql
Last modified: 2007-11-25 22:23:46 UTC
I am trying to upgrade to spamassassin 3.1 and wanted to convert our bayes database from the old Berkeley database to use our Postgres installation that works for other packages. I followed the bayes readme and the bayes.pg readme and created a spamassassin postgres database to use. I then tried psql -U postgres -f bayes_pg.sql spamassassin and partway through the program I get an error message. Here is the total output from the program. psql:bayes_pg.sql:13: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bayes_global_vars_pkey" for table "bayes_global_vars" psql:bayes_pg.sql:22: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bayes_seen_pkey" for table "bayes_seen" psql:bayes_pg.sql:31: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bayes_token_pkey" for table "bayes_token" psql:bayes_pg.sql:47: NOTICE: CREATE TABLE will create implicit sequence "bayes_vars_id_seq" for "serial" column "bayes_vars.id" psql:bayes_pg.sql:47: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bayes_vars_pkey" for table "bayes_vars" psql:bayes_pg.sql:112: ERROR: syntax error at or near "INTEGER" at character 48 THe error appears to come from the plpgsql procedure that is defined, but I don't know enough about the language to see anything obvious. I am running SA fine by still using our old BDB bayes database but it would be great if I can get it transferred to our Postrgres. ----- The reporter was using Postgres 7.4.7 -- it was suggested that Postgres 8.0 is required. Is this correct? (If so, the docs need updating...)
Older versions of PostgreSQL do not like the named params. This has been fixed in 3.3.0-dev. Please refer to bug 4653 if you would like to patch your older version. *** This bug has been marked as a duplicate of 4653 ***