 
 spi_exec_query("SELECT dbi_link.cache_connection( $params->{data_source_id} )");
 
+# escape character, default to empty string
+my $esc = $_SHARED{dbh}{ $params->{data_source_id} }->get_info(14) || '';
+(my $escaped_schema = $params->{remote_schema}) =~ s/([_%])/$esc$1/g;
 my $sth = $_SHARED{dbh}{ $params->{data_source_id} }->table_info(
     $params->{remote_catalog},
-    $params->{remote_schema},
+    $escaped_schema,
     '%',
     $types
 );

    my (@raw_cols, @cols, @types);
    my %comments = ();
    warn "Getting column info for >$table->{TABLE_NAME}<" if $_SHARED{debug};
    my $sth2 = $_SHARED{dbh}{ $params->{data_source_id} }->column_info(
        undef,
        $params->{remote_schema},
        $table->{TABLE_NAME},
        '%'
    );
######################################################################

    \z                  # End of string.
}
{$1}sx;
$table = $remote_schema . "." . $table if defined $remote_schema;
warn "Cooked table name is $table";

my $iud = {
