summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/psycopg2.py
diff options
context:
space:
mode:
authorRamonWill <ramonwilliams@hotmail.co.uk>2020-09-16 17:47:21 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-10-12 17:38:34 -0400
commit1cda8e18bf4e9b36d07b9d54c04e1fe035977064 (patch)
tree9d7ad74137f096b2c105ccbf7932529d3ad2c83c /lib/sqlalchemy/dialects/postgresql/psycopg2.py
parent3fcdb7cca05de3a90c4f3b9f96ae680618a26c41 (diff)
downloadsqlalchemy-1cda8e18bf4e9b36d07b9d54c04e1fe035977064.tar.gz
Support indexing on expressions and functions for the MySQL dialect
A user noticed that creating an index where the "key part" was an expression or function would raise an error for MySQL because the key part was not parenthesized. The proposed change will check whether a key part is not a Column or Unary Expression and parenthesize if the case is False. This fix also contains a minor fix to a test case that was previously incorrect (`def test_create_index_expr():`). **Have a nice day!** Fixes: #5462 Closes: #5587 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5587 Pull-request-sha: 7515e50cd7435744fc79c210b2f3aa4c0546ba28 Change-Id: Id1b3b3026983c0e05808baa243e354f82b78180c
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
0 files changed, 0 insertions, 0 deletions