Forum OpenACS Q&A: cannot add group type

Collapse
Posted by davide dambrosio on
when I try to add a group type I get the following error,
any suggestion?
thankx,

Davide

NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "ruoli_ext_group_id_pk" for table "ruoli_ext"
CONTEXT:  PL/pgSQL function "__exec_15_create_table" line 4 at SQL statement
NOTICE:  DROP PACKAGE: ruoli
CONTEXT:  PL/pgSQL function "__exec_16_create_package_body" line 5 at perform
NOTICE:  PACKAGE: ruoli NOT FOUND
CONTEXT:  PL/pgSQL function "__exec_16_create_package_body" line 5 at perform
[08/Jun/2004:17:24:36][21997.114696][-conn:auditorium::4] Error: Ns_PgExec: result status: 7 message: ERROR:  duplicate key violates unique co
nstraint "acs_function_args_un"
CONTEXT:  PL/pgSQL function "define_function_args" line 25 at SQL statement
PL/pgSQL function "__exec_16_create_package_body" line 7 at perform

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")
    while executing
"ns_db 0or1row $db "select $function_name ()""
    invoked from within
"db_exec_plpgsql $db $full_statement_name $sql  $statement_name"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
                ns_log Debug "PLPGSQL: bypassed anon function"
                set selection [..."
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
            # plsql calls that are simple selects bypass the plpgsql
            # mechanism for creating anonymous fun..."
    (procedure "db_exec_plsql" line 57)
    invoked from within
"db_exec_plsql $stmt_name $code"
    (procedure "package_create" line 32)
    invoked from within
"package_create $type"
    (procedure "package_recreate_hierarchy" line 27)
    invoked from within
"package_recreate_hierarchy $group_type"
    (procedure "group_type::new" line 111)
    invoked from within
"group_type::new -group_type $object_type -supertype $supertype $pretty_name $pretty_plural"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 39)
    invoked from within
"db_transaction {
    group_type::new -group_type $object_type -supertype $supertype $pretty_name $pretty_plural
    }"
    invoked from within
"if { [template::form is_valid group_type] } {

    set exception_count 0

    # Verify that the object type (in safe oracle format) is unique
    ..."
    ("uplevel" body line 44)
    invoked from within
"uplevel {
# /packages/mbryzek-subsite/www/admin/groups/add.tcl

ad_page_contract {
    Form to add a group type

    @author mailto:rhs@mit.edu
    @creation..."
    (procedure "code::tcl::/usr/local/openacs/auditorium/packages/acs-subsit..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 5)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
                $handler
            } ad_script_abort val {
                # do nothing
            }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
            rp_serve_abstract_file "$root/$path"
            set tcl_url2file([ad_conn url]) [ad_conn file]
            set tcl_url2path_info..."

Collapse
2: Re: cannot add group type (response to 1)
Posted by Giampiero Recco on
From the cvs I have noticed that about two months ago,
donb as commited a change in this file:

openacs/openacs-4/packages/acs-subsite/tcl/package-procs-postgresql.xql

more porecisely, the change is at line 24:

from cvs version 1.12:

  upper(coalesce(attr.column_name, attr.attribute_name)) as attr_column_name,

to cvs version 1.13 (current is 1.14)

  coalesce(attr.column_name, attr.attribute_name) as attr_column_name,

reverting the change fixes the problem and now I can correctly create new group_types, but I don't know if there are other problems now.

does anyone know what problem could arise reverting this change?  Donb do you?

Thank you,
Giampiero