db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Postgresql, integer types, and size (Torque 3.2 only)
Date Mon, 27 Mar 2006 22:10:34 GMT
I would claim this to be a problem of the schema.sql. If the column does 
not support a size, it should not be forces to take one, so the correct 
schema.xml would look like

  <column name="DELETED" required="false" type="BOOLEANINT"
  default="0" javaType="primitive"/>

However, as we want to keep our users happy, I have just checked in a 
PlatformPosrgresqlImpl class for the generator which tells the generator 
not to give sizes to postgresql int2 columns. If you do not want to 
correct the schema, you may want to get the class (or the whole generator) 
from SVN.

   Thomas

On Sat, 25 Mar 2006, Peter Ledbrook wrote:

> Hi,
>
> I have tried to build Scarab against a postgresql database, but I'm
> running into a problem with the SQL generated by Torque. The Scarab
> database schema specifies a size for some of its integer columns, and
> these columns then have a type of INTEGER(n), where 'n' is the given
> size. For example:
>
>  <column name="DELETED" required="false" type="BOOLEANINT"
> default="0" size="1" javaType="primitive"/>
>
> becomes the SQL:
>
>  DELETED INT2(1)
>
> Unfortunately, postgresql does not support a size here, i.e. "INT2"
> works, but "INT2(1)" does not. Note that this problem occurs with
> INTEGER as well as BOOLEANINT.
>
> Is this a know problem? Is there a workaround other than removing the
> 'size' attributes from integer columns?
>
> Thanks,
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message