Escape column names that are reserved words when inserting a row from a
hash.
This commit is contained in:
parent
d67af2d0f4
commit
8bf2092fe0
|
@ -841,6 +841,12 @@ sub db_process_insert($$$$;@) {
|
||||||
}
|
}
|
||||||
$wildcards = '('.$wildcards.')';
|
$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 $columns_string = join(',', @columns_array);
|
||||||
|
|
||||||
my $res = db_insert ($dbh,
|
my $res = db_insert ($dbh,
|
||||||
|
|
Loading…
Reference in New Issue