portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaq Marit (JIRA)" <jetspeed-...@jakarta.apache.org>
Subject [jira] Commented: (JS2-160) db.create fails on Postgres
Date Wed, 17 Nov 2004 07:37:25 GMT
     [ http://nagoya.apache.org/jira/browse/JS2-160?page=comments#action_55565 ]
     
Jaq Marit commented on JS2-160:
-------------------------------

I guess this problem is more related to torque than jetspeed. Personally, I'd also prefer
using an INT representation for boolean values as boolean types are not supported by all DBMS.

As an alternative workaround, you can play a bit with torque's db.props as a way of customizing
torque's behavior 
(e.g., bit=int2).  



> db.create fails on Postgres
> ---------------------------
>
>          Key: JS2-160
>          URL: http://nagoya.apache.org/jira/browse/JS2-160
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Project Build
>     Versions: 2.0-dev/cvs
>  Environment: Postgres 8.0.0beta4, Windows
>     Reporter: John Donald
>     Priority: Minor

>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message