Escape column names that are reserved words when inserting a row from a

hash.
This commit is contained in:
Ramon Novoa 2015-10-09 12:38:15 +02:00
parent d67af2d0f4
commit 8bf2092fe0
1 changed files with 6 additions and 0 deletions

View File

@ -841,6 +841,12 @@ sub db_process_insert($$$$;@) {
}
$wildcards = '('.$wildcards.')';
# Escape column names that are reserved words
for (my $i = 0; $i < scalar(@columns_array); $i++) {
if ($columns_array[$i] eq 'interval') {
$columns_array[$i] = "${RDBMS_QUOTE}interval${RDBMS_QUOTE}";
}
}
my $columns_string = join(',', @columns_array);
my $res = db_insert ($dbh,