You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Przemysław Sztoch <jn...@navy.main.pl> on 2006/03/10 10:04:29 UTC

Re: PostgreSQL platform (text type) + onUpdate,onDelete,name of pk,size of ts

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 <jn...@navy.main.pl>
Mobile +48 (502) 400 239, GG 569973