John McNally wrote:

>I use DATETIME and torque.  What's the problem you are having with it?
>  
>
I was under the impression that the database.dtd does not support 
DATETIME as a column name

http://cvs.apache.org/viewcvs/jakarta-turbine-torque/src/dtd/database.dtd?rev=1.12&content-type=text/vnd.viewcvs-markup

i.e.

  type
    (
          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | 
LONGVARCHAR
        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | 
LONGVARBINARY
        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
        | DOUBLE
    ) "VARCHAR"
 
does not include the option "DATETIME".  If I want to get a DATETIME 
column in MySQL I select DATE as my column type in my schema.  This by 
itself would seem to require a change, i.e. what if I want a DATE column 
in MySQL? it seems I have to way to request it.  This implies that the 
DATE, TIME, TIMSTAMP, and DATETIME column types should all be supported 
at the dtd level.

Now there is no DATETIME column type in postgreSQL, so DATE just stays 
as DATE.  My application cannot use TIMESTAMP in MySQL meaning that I 
have to change my schema in order to get it to work with postgre.  I 
want to be able to release a single schema that people will be able to 
use to create the appropriate database tables in both MySQL and Postgre

In order to do this I think the database dtd should be changed to 
include a DATETIME option which would map onto "DATETIME" in MySQL and 
"TIMESTAMP" in PostGreSQL, and the DATE /TIME column types would be 
mapped onto DATE/TIME in both databases.

I was hoping to hear about which parts of the code would require changes 
to support this.

Thanks in advance.

CHEERS> SAM


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to