db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Przemysław Sztoch <jna...@navy.main.pl>
Subject Re: PostgreSQL platform (text type) + onUpdate,onDelete,name of pk,size of ts
Date Fri, 10 Mar 2006 09:04:29 GMT
Ad.1. My idea is wrong.

Ad.2+4+pkName. Please, check my attached proposition of the patch.
I don't properly update toString() in Table and ForeignKey class.

P.S. src/java/database.dtd is application/octet-stream. Is it correct?

Przemysław Sztoch napisał(a):
> Hello!
> 
> 1. Why "text" pgsql type is mapped to Type.VARCHAR?
> a) In PostgreSqlPlatform.java is:
> info.addNativeTypeMapping(Types.LONGVARCHAR, "TEXT", Types.VARCHAR);
> b) IMO should be:
> info.addNativeTypeMapping(Types.LONGVARCHAR, "TEXT", Types.LONGVARCHAR);
> 
> 2. "timestamp" and "time" should have:
> info.setHasSize(Types.TIMESTAMP, true);
> info.setHasSize(Types.TIME, true);
> 
> Ref: PgSQL 8.0.3 Doc; 8.5. Date/Time Types; Table 8-9. Date/Time Types
> 
> 3. COMMENT ON TABLE/COLUMN support should be added
> 
> 4. No support for onUpdate/onDelete attributes of foreign-key element.
> Very easy in implementation:
> alter table cgrupa2
>     add constraint fk_cgrupa2_gkom1 foreign key (gkom1_id)
>        references gkom1 (gkom1_id) ON UPDATE CASCADE ON DELETE RESTRICT;

-- 
Przemysław Sztoch <jnavy1@navy.main.pl>
Mobile +48 (502) 400 239, GG 569973

Mime
View raw message