Forum OpenACS Development: PostgreSQL 7.4RC1 problems

Collapse
Posted by Guan Yang on
I am trying to install OpenACS on Mac OS X (Panther). I am using PG 7.4RC1 because a lot of Darwin bugs are fixed there. oacs-4-6-3-final.

The error:
psql:acs-create.sql:188: ERROR:  operator is not unique: bit varying || "unknown"

acs-create.sql:188 is the first call to acs_privilege__add_child. That function does nothing but insert a row into the acs_privilege_hierarchy table.

Any clues?

Collapse
Posted by Jeff Davis on
Its probably an error in one of the triggers but I am not sure which one it could be.
Collapse
Posted by Guan Yang on
Here's the rest, forgot it before. It mentions acs_priv_hier_priv_fk, but I'm not sure that's the problem.

psql:acs-create.sql:188: ERROR:  operator is not unique: bit varying || "unknown"
HINT:  Could not choose a best candidate operator. You may need to add explicit type casts.
CONTEXT:  PL/pgSQL function "tree_right" line 12 at return
PL/pgSQL function "acs_priv_hier_ins_del_tr" line 61 at SQL statement
psql:acs-create.sql:189: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:acs-create.sql:190: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:acs-create.sql:191: ERROR:  current transaction is aborted, commands ignored until end of transaction block
CONTEXT:  PL/pgSQL function "acs_object__new" line 12 at select into variables
PL/pgSQL function "acs_rel__new" line 13 at assignment
PL/pgSQL function "membership_rel__new" line 11 at assignment
PL/pgSQL function "inline_2" line 54 at perform
psql:acs-create-2.sql:17: ERROR:  insert or update on table "acs_privilege_hierarchy" violates foreign key constraint "acs_priv_hier_priv_fk"
DETAIL:  Key (privilege)=(admin) is not present in table "acs_privileges".

    invoked from within
"db_source_sql_file -callback apm_ns_write_callback "acs-kernel-create.sql""
    (file "/web/nadev/packages/acs-bootstrap-installer/installer/install-data-model.tcl" line 31)
    invoked from within
"source $__file "

Collapse
4: Found the problem (response to 1)
Posted by Guan Yang on
A cast was missing in tree_right (packages/acs-kernel/sql/postgresql/postgresql.sql):

589c589
<    return key || ''XFFFFFFFF'';
---
<blockquote>    return key || ''XFFFFFFFF''::varbit;
</blockquote>

Collapse
Posted by Jade Rubick on
Guan, can you submit this to the bug-tracker (https://openacs.org/bugtracker/openacs), so that it will get put into the toolkit for future versions? Just reference this forum thread URL
Collapse
Posted by Jeff Davis on
I fixed it already.