Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion vertica_python/vertica/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import datetime
import glob
import inspect
import os
import re
import sys
import traceback
Expand Down Expand Up @@ -653,7 +654,7 @@ def object_to_string(self, py_obj, is_copy_data):
# noinspection PyArgumentList
def format_operation_with_parameters(self, operation, parameters, is_copy_data=False):
if isinstance(parameters, dict):
if parameters and ':' not in operation:
if parameters and ':' not in operation and os.environ.get('VERTICA_PYTHON_IGNORE_NAMED_PARAMETER_CHECK') != '1':
raise ValueError(f'Invalid SQL: {operation}'
"\nHINT: When argument 'parameters' is a dict, variables in SQL should be specified with named (:name) placeholders."
" If you use a dict to represent the value of a ROW type column, enclose the dict with brackets('[]') to construct a list.")
Expand Down