message: fix: don't close cursor before closing connection
diff: @@ -379,7 +379,8 @@ def execute_sql_statements( # pylint: disable=too-many-arguments, too-many-loca
  # Sharing a single connection and cursor across the
  # execution of all statements (if many)
  with closing(engine.raw_connection()) as conn:
  - with closing(conn.cursor()) as cursor:
  + # closing the connection closes the cursor as well
  + cursor = conn.cursor()
  statement_count = len(statements)
  for i, statement in enumerate(statements):
  # Check if stopped
  @@ -390,10 +391,7 @@ def execute_sql_statements( # pylint: disable=too-many-arguments, too-many-loca
  # For CTAS we create the table only on the last statement
  apply_ctas = query.select_as_cta and (
  query.ctas_method == CtasMethod.VIEW
  - or (
  - query.ctas_method == CtasMethod.TABLE
  - and i == len(statements) - 1
  - )
  + or (query.ctas_method == CtasMethod.TABLE and i == len(statements) - 1)
  )
  # Run statement
  