We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

installing help

Hello,
I have failed to populate the database with default tables:
bash-3.2$ /usr/bin/psql -d openclinica -f /var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql > /usr/tmp/log.txt
I get a lot of errors like this:
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4172: ERROR: foreign key constraint "fk_user_acc_fk_user_f_user_acc" cannot be implemented
> > DETAIL: Key columns "owner_id" and "user_id" are of incompatible types: numeric and integer.
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4180: ERROR: foreign key constraint "fk_user_acc_ref_user__user_typ" cannot be implemented
> > DETAIL: Key columns "user_type_id" and "user_type_id" are of incompatible types: numeric and integer.
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4188: ERROR: foreign key constraint "fk_user_acc_status_re_status" cannot be implemented
> > DETAIL: Key columns "status_id" and "status_id" are of incompatible types: numeric and integer.
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4196: ERROR: foreign key constraint "fk_versioni_fk_versio_crf_vers" cannot be implemented
> > DETAIL: Key columns "crf_version_id" and "crf_version_id" are of incompatible types: numeric and integer.
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4204: ERROR: foreign key constraint "fk_versioni_fk_versio_item" cannot be implemented
> > DETAIL: Key columns "item_id" and "item_id" are of incompatible types: numeric and integer.
> > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4212: ERROR: foreign key constraint "fk_versioni_reference_instrume" cannot be implemented
> > DETAIL: Key columns "crf_id" and "crf_id" are of incompatible types: numeric and integer.
My system:
Fedora 9
[[email protected] usr]# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
> > [[email protected] usr]# /usr/bin/psql --version
> > psql (PostgreSQL) 8.3.3
> > contains support for command-line editing
Thx for your answers ...
Iztok
OpenCinica on

Comments

  • smithsmith Posts: 120
    Hi,
    I had the same problem using postgresql-8.3 ... use postgresql-8.2
    instead.
    Thanks
    On Fri, 2008-08-15 at 18:31 +0200, Iztok Štotl wrote:
    > > Hello,
    > >
    > > I have failed to populate the database with default tables:
    > >
    > > bash-3.2$ /usr/bin/psql -d openclinica -f /var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql > /usr/tmp/log.txt
    > >
    > > I get a lot of errors like this:
    > >
    > >
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4172: ERROR: foreign key constraint "fk_user_acc_fk_user_f_user_acc" cannot be implemented
    >> > > DETAIL: Key columns "owner_id" and "user_id" are of incompatible types: numeric and integer.
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4180: ERROR: foreign key constraint "fk_user_acc_ref_user__user_typ" cannot be implemented
    >> > > DETAIL: Key columns "user_type_id" and "user_type_id" are of incompatible types: numeric and integer.
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4188: ERROR: foreign key constraint "fk_user_acc_status_re_status" cannot be implemented
    >> > > DETAIL: Key columns "status_id" and "status_id" are of incompatible types: numeric and integer.
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4196: ERROR: foreign key constraint "fk_versioni_fk_versio_crf_vers" cannot be implemented
    >> > > DETAIL: Key columns "crf_version_id" and "crf_version_id" are of incompatible types: numeric and integer.
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4204: ERROR: foreign key constraint "fk_versioni_fk_versio_item" cannot be implemented
    >> > > DETAIL: Key columns "item_id" and "item_id" are of incompatible types: numeric and integer.
    >> > > psql:/var/oc/config/database/PostgreSQL/2.2.2/install/create_database_2_2_2_with_data.sql:4212: ERROR: foreign key constraint "fk_versioni_reference_instrume" cannot be implemented
    >> > > DETAIL: Key columns "crf_id" and "crf_id" are of incompatible types: numeric and integer.
    > >
    > > My system:
    > > Fedora 9
    > > [[email protected] usr]# java -version
    > > java version "1.6.0"
    > > OpenJDK Runtime Environment (build 1.6.0-b09)
    > > OpenJDK Client VM (build 1.6.0-b09, mixed mode)
    > >
    >> > > [[email protected] usr]# /usr/bin/psql --version
    >> > > psql (PostgreSQL) 8.3.3
    >> > > contains support for command-line editing
    > >
    > > Thx for your answers ...
    > >
    > > Iztok
    > >
    > >
    > > OpenCinica on
    > >
    > >
  • messnermessner Posts: 28
    On Fri, 2008-08-15 at 13:11 -0400, csmith wrote:
    > > Hi,
    > >
    > > I had the same problem using postgresql-8.3 ... use postgresql-8.2
    > > instead.
    Thank you for your answer ;)
    I have installed postgresql with yum and I like i that way ... I will
    try you way of "solving" the problem on the end, but I would be very
    glad if I wouldn't have to downgrade my base server ? I am using psql
    for the first time now, I am much more familiar with MySQL.
    Any ideas why does this bug happen anyway ? And how to get rid of it and
    still using the new version of the psql ?
    Iztok
  • messnermessner Posts: 28
    On Fri, 2008-08-15 at 19:21 +0200, Iztok Štotl wrote:
    > > On Fri, 2008-08-15 at 13:11 -0400, csmith wrote:
    >> > > Hi,
    >> > >
    >> > > I had the same problem using postgresql-8.3 ... use postgresql-8.2
    >> > > instead.
    I have compiled postgresql-2.7 my own ;)
    It works now. I don't really think, this is new versions fault. Probably
    the default settings from fedora (and Ubuntu 8.4) pgsql install are
    somehow different from compiled version.
    Next time I will try to compile the new version and I will let you know
    how it went ...
    Iztok
This discussion has been closed.