Forum .LRN Q&A: Problem with create class

After restoring a backup of the database and application I get an error when creating course

Database operation "0or1row" failed
(exception ERROR, "ERROR:  operator does not exist: character varying = integer
LINE 1: ...arameters p where p.key = 'folder_id' and p.value =  $1  and...
                                                            ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
QUERY:  select m.element_id from portal_element_map m, portal_element_parameters p where p.key = 'folder_id' and p.value =  $1  and m.element_id = p.element_id and m.name = 'fs_contents_portlet'
CONTEXT:  PL/pgSQL function "fold_rename" line 6 at FOR over SELECT rows
SQL statement "update cr_folders set label =  $1  where folder_id =  $2 "
PL/pgSQL function "content_folder__edit_name" line 29 at SQL statement
")

Collapse
Posted by Dave Bauer on
It looks like you changed PostgreSQL versions, OR you had some specific server setting to support older OpenACS versions in your postgresql configuration.

Newer OpenACS versions support up to PG 8.4 I believe but older versions might need to be upgraded to work with PG 8.4.

The server have a PG8.2, dotLRN 2.1.0b4  and i'm using PG8.3, dotLRN 2.4.1

try to install PG8.2

Collapse
Posted by Emmanuelle Raffenne on
Hi Fernando,

.LRN 2.4.1 is not ready for postgresql version 8.3, it works with pg 8.1 and 8.2. We recommend you use version 8.2.

.LRN 2.5.0 will support postgresql version 8.3

thanks Emmanualle

The scenario is PG8.2, dotLRN-2.1.0b4 but restored in reviewing PG8.3 the log postgresql found the following error:

psql: backup.01-07-2009.dump: 16003236: ERROR: foreign key constraint "rss_gen_subscrs_ctx_fk" can not be implemented
DETAIL: Key columns "summary_context_id" and "object_id" are of incompatible types: character varying and integer.

Collapse
Posted by Emmanuelle Raffenne on
Hi Fernando,

dotLRN 2.1.0 uses OpenACS 5.1, check the compatibility matrix at http://www.openacs.org/xowiki/openacs-compatibility-matrix

Hi emmanuelle

I try restore the database en PG8.2 but dont work i get the same error

Collapse
Posted by Don Baccus on
The problem is that "summary_context_id" was declared to be varchar(100) originally, though the key it references is an integer.

Versions of PG up to 8.2 would automatically convert it to an integer, PG 8.3 correctly catches it as a type incompatibility error.

It was fixed by me in february 2008 so should be in 2.4, actually, *however* I rather stupidly forgot to commit my upgrade script, so I guess I'll have to recreate it...

I'll post here when I do ...

For now, use PG 8.2 ...

Collapse
Posted by Don Baccus on
OK, I've added the upgrade script on the oacs-5-5 branch.

If you'd like to test it, check it out and use the APM package upgrade facility to install the upgrade on your local copy.