Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 19 May 2007 09:38:21 -0000 1.20 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 23 May 2007 07:05:11 -0000 1.21 @@ -193,6 +193,8 @@ ::xotcl::Object create sql if {[db_driverkey ""] eq "postgresql"} { + proc map_sql_datatype {type} {return $type} + sql proc select { -vars:required -from:required @@ -211,6 +213,13 @@ return "SELECT $vars FROM $from WHERE $where $group_clause $order_clause $limit_clause" } } else { ;# Oracle + proc map_sql_datatype {type} { + switch $type { + text {set type varchar(64000)} + } + return $type + } + sql proc select { -vars:required -from:required 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.66 -r1.67 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 22 May 2007 15:09:13 -0000 1.66 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 23 May 2007 07:05:11 -0000 1.67 @@ -177,17 +177,6 @@ -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 @@ -202,7 +191,7 @@ -attribute_name $attribute_name \ -datatype $datatype \ -pretty_name $pretty_name \ - -column_spec [my map_sql_datatype $sqltype] + -column_spec [::xo::db::map_sql_datatype $sqltype] } if {![info exists default]} { set default ""