From b7f6fb5f522db7e03c9cce7bc21222aa0843d166 Mon Sep 17 00:00:00 2001 From: Yuval Dinari <> Date: Mon, 15 Jul 2019 17:48:50 +0300 Subject: [PATCH] Change field name from multi_params to clearer multiple_rows Fixes: #4623 --- lib/sqlalchemy/dialects/postgresql/psycopg2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 45201a2b9d..b2d09694ca 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -559,7 +559,7 @@ class PGCompiler_psycopg2(PGCompiler): self, dialect, statement, column_keys=None, inline=False, **kwargs ): self.dialect = dialect - self.multi_params = inline + self.multiple_rows = inline self.execute_values_insert_template = None self.execute_values_page_size = 2000 super(PGCompiler_psycopg2, PGCompiler_psycopg2).__init__(self, dialect, statement, column_keys, inline, **kwargs) @@ -568,7 +568,7 @@ class PGCompiler_psycopg2(PGCompiler): def generate_values_placeholders_str(self, crud_params, returning_clause_exists): # Currently not using psycopg2.execute_values() when there's a returning clause; need to add support # for receiving multiple return values from insert query - if self.multi_params and not returning_clause_exists and self.dialect.psycopg2_batch_mode == 'execute_values': + if self.multiple_rows and not returning_clause_exists and self.dialect.psycopg2_batch_mode == 'execute_values': self.execute_values_insert_template = "(" + ", ".join([c[1] for c in crud_params]) + ")" return " VALUES %s" else: -- 2.47.3