Forum OpenACS Development: Re: Best version of xowiki and xotcl to download!?

Collapse
Posted by Matthew Coupe on
> The problem with content_type__drop_type() looks easier to track. The SQL function was added by malte in july last year and is part of content-type.sql in oacs-5-3, and is included in the update scripts acs-content-repository/sql/postgresql/upgrade/upgrade-5.3.0d2-5.3.0d3.sql

We won't have got that as we are on acs-content-repository 5.2.3. Shall I try that sourcing that script?

Here are the results, drop type only has the one with the three arguments:

nccedudotlrn=# \df content_type__create_attribute
List of functions
Result data type | Schema | Name | Argument data types
------------------+--------+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------
integer | public | content_type__create_attribute | character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying
(1 row)

nccedudotlrn=# \df content_type__drop_type
List of functions
Result data type | Schema | Name | Argument data types
------------------+--------+-------------------------+-------------------------------------
integer | public | content_type__drop_type | character varying, boolean, boolean
(1 row)

Collapse
Posted by Gustaf Neumann on
I see, you are on the oacs-5-2 branch. The xotcl-core and xowiki versions in the oacs-5-3 branch really depend on he oacs-5-3. You can try to source the update script, but i would recommend the following:
  • make a dump of your database
  • source the update-script mentioned above

But this will not solve the problem with content_type__create_attribute(). It seems that PostgreSQL had in earlier version problems with adding attributes with default values (the error message is: ERROR: adding columns with defaults is not implemented), see as well http://archives.postgresql.org/pgadmin-support/2004-01/msg00003.php.

Apparently, this has changed in postgres 8.*. xowiki passes the default value in the table_spec (arg 8), which is the only way to add it through the oacs interface to the database. It seems that in postgres 7.*, one had to add the column without the default value and perform an ALTER TABLE SET DEFAULT. this could be achieved by altering content_type__create_attribute() in oacs-5-2 for 7.4. Not sure, whether this is worth the effort. The problem does not exist in PostgreSQL 8.*. Isn't upgrading to postgres 8.* an option for you?