]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add override hook PGDialect.set_backslash_escapes()
authorMatt del Valle <matt.del.valle@outplay.com>
Mon, 13 Mar 2023 18:38:31 +0000 (14:38 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Mon, 13 Mar 2023 18:38:31 +0000 (14:38 -0400)
commit65eb057d0c586f2eed43ac0731822053f0f6d472
treeb7dbb4ec968f9e90fdbba31244fb88519689ce64
parentee563d18b49c5d9845e2216319927fedd015e7ec
Add override hook PGDialect.set_backslash_escapes()

### Description
Refactor out the lines in `PGDialect.initialize()` that set backslash escapes into their own method to provide an override hook for [`sqlalchemy-redshift`](https://github.com/sqlalchemy-redshift/sqlalchemy-redshift) to use.

Fixes #9442

### Checklist

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #9475
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9475
Pull-request-sha: 5565afeac20ea3612c3f427f58efacd8487ac159

Change-Id: I9b652044243ab231c19ab55ebc8ee24534365d61
doc/build/changelog/unreleased_20/9442.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py