]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
harden HSTORE registration
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 Dec 2024 15:58:01 +0000 (10:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 Dec 2024 17:10:18 +0000 (12:10 -0500)
commit1f726a3a8819f518e760a544076228dbc2dd169d
treef4da9b26da574584ecf615eaade1c982fc3109b4
parent5c711ddf478f98dee728068e92520601e7d35401
harden HSTORE registration

* use the driver_connection when we register on the connection
* assert targets passed to register_hstore assert as boolean true;
  psycopg docs say "if None, register globally" but looking in the
  source it's actually registering globally if any false-evaluating
  object is passed.

Change-Id: Ie1fd7c96714b7fe76ef964501691fa48352be259
(cherry picked from commit 29569ccfde7247a7e0ed2afe43db53494da62fb2)
lib/sqlalchemy/dialects/postgresql/hstore.py
lib/sqlalchemy/dialects/postgresql/psycopg.py