[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-dev
Subject:    Re: Postgresql - Text Data Type
From:       Hilco Wijbenga <hilco.wijbenga () elasticpath ! com>
Date:       2005-11-14 22:46:02
Message-ID: 1132008362.5471.22.camel () hwijbenga ! dev ! elasticpath ! com
[Download RAW message or body]

On Thu, 2005-11-10 at 23:14 -0800, Thomas Fischer wrote:
> For the following entry in the schema.xml
>    <table name="clob_test">
>      <column name="id" required="true" primaryKey="true" type="SMALLINT" />
>      <column name="clob_value" type="CLOB" required="false"/>
>      <column name="LONGVARCHAR_value" type="LONGVARCHAR" required="false"/>
>    </table>
> 
> I get the following sql in torque:insert-sql
> 
> DROP TABLE clob_test CASCADE;
> 
> CREATE TABLE clob_test
> (
>      id INT2 NOT NULL,
>      clob_value TEXT,
>      LONGVARCHAR_value TEXT,
>      PRIMARY KEY (id)
> );

I found the reason. If you explicitely add a size

<column
  name="LONGVARCHAR_value"
  type="LONGVARCHAR"
  size="65535"/>

then Torque generates 'text(65535)'. At least for PostgreSQL, this
should be 'text' regardless of the size attribute.

I'm not sure if this is something that should be fixed higher up or in
the Velocity template like I did originally.


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic