--- libsql-statement-perl.orig/lib/SQL/Statement.pm
+++ libsql-statement-perl/lib/SQL/Statement.pm
@@ -1762,7 +1762,8 @@
     # we use the existing S::S::Func object
     #
     use SQL::Statement::Util;
-    if ( $type eq 'function' and $structure->{name} !~ /(TRIM|SUBSTRING)/i ){
+    if ( $type eq 'function' and $structure->{name} =~ /[A-Z]/ and 
+	 $structure->{name}!~ /(TRIM|SUBSTRING)/i ){
         $self->{loaded_function}->{$structure->{name}}
             ||= SQL::Statement::Util::Function->new($structure);
         $structure = $self->{loaded_function}->{$structure->{name}};
