diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py index ce5e274649..ad87eb82e7 100644 --- a/django/db/backends/utils.py +++ b/django/db/backends/utils.py @@ -186,7 +186,7 @@ def truncate_name(name, length=None, hash_len=4): If a quote stripped name contains a username, e.g. USERNAME"."TABLE, truncate the table portion only. """ - match = re.match('([^"]+)"\."([^"]+)', name) + match = re.match(r'([^"]+)"\."([^"]+)', name) table_name = match.group(2) if match else name if length is None or len(table_name) <= length: