Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v diff -u -r1.59 -r1.60 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 11 May 2007 11:58:55 -0000 1.59 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 14 May 2007 08:11:54 -0000 1.60 @@ -175,6 +175,17 @@ -include_subtypes t } + if {[db_driverkey ""] eq "postgresql"} { + CrClass instproc map_sql_datatype {type} {return $type} + } else { ;# Oracle + CrClass instproc map_sql_datatype {type} { + switch $type { + text {set type varchar(2000)} + } + return $type + } + } + CrClass instproc create_attributes {} { if {[my cr_attributes] ne ""} { my instvar object_type @@ -189,7 +200,7 @@ -attribute_name $attribute_name \ -datatype $datatype \ -pretty_name $pretty_name \ - -column_spec $sqltype + -column_spec [my map_sql_datatype $sqltype] } if {![info exists default]} { set default ""