Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-160

db.create fails on Postgres

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0-dev/cvs
    • 2.0-M4
    • Project Build
    • None
    • Postgres 8.0.0beta4, Windows

    Description

      I'm having Problems with Postgres.

      The relation SiteTable has two columns with type BIT.
      The default value is an integer, but postgres expects boolean.

      So instead of

      <!--
      Create SiteTable
      -->
      <table name="SSO_SITE">
      <column name="SITE_ID" primaryKey="true" required="true" type="INTEGER"/>
      <column name="NAME" required="true" size="254" type="VARCHAR"/>
      <column name="URL" required="true" size="254" type="VARCHAR"/>
      <column name="ALLOW_USER_SET" default="0" type="BIT"/>
      <column name="REQUIRES_CERTIFICATE" default="0" type="BIT"/>
      </table>

      it would be correct to have:

      ...
      <column name="ALLOW_USER_SET" default="false" type="BIT"/>
      <column name="REQUIRES_CERTIFICATE" default="false" type="BIT"/>
      ...

      I guess by simply changing it, other databases may fail.

      ===
      Build output:

      db.execute:
      [sql] Executing file: C:\usr\jakarta-jetspeed-2\target\src\sql\postgres\security-schema.sql
      [sql] [ERROR] Failed to execute: CREATE TABLE SSO_SITE ( SITE_ID integer NOT NULL, NAME varchar (254) NOT NULL, URL varchar (254) NOT NULL, ALLOW_USER_SET b
      oolean default 0, REQUIRES_CERTIFICATE boolean default 0, PRIMARY KEY (SITE_ID) )

      BUILD FAILED
      File...... C:\usr\jakarta-jetspeed-2\maven.xml
      Element... sql
      Line...... 355
      Column.... 39
      java.sql.SQLException: ERROR: column "allow_user_set" is of type boolean but default expression is of type integer

      Attachments

        Activity

          People

            Unassigned Unassigned
            john.donald John Donald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: