diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-13 08:41:32 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-13 08:49:12 +0300 |
commit | 729cf217631f33c3297a77b89df46671992350ac (patch) | |
tree | db808d27d756c10fe26ab8aba46e1b52d7fb0476 /contrib/python/pg8000/.dist-info/METADATA | |
parent | b2d826f65dc1cddb9e2ebca3b0048bb0e8052340 (diff) | |
download | ydb-729cf217631f33c3297a77b89df46671992350ac.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/pg8000/.dist-info/METADATA')
-rw-r--r-- | contrib/python/pg8000/.dist-info/METADATA | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/contrib/python/pg8000/.dist-info/METADATA b/contrib/python/pg8000/.dist-info/METADATA index ba1c9b0727..f89f5ac7aa 100644 --- a/contrib/python/pg8000/.dist-info/METADATA +++ b/contrib/python/pg8000/.dist-info/METADATA @@ -1,8 +1,9 @@ Metadata-Version: 2.3 Name: pg8000 -Version: 1.31.1 +Version: 1.31.2 Summary: PostgreSQL interface library Project-URL: Homepage, https://github.com/tlocke/pg8000 +Author: The Contributors License: BSD 3-Clause License License-File: LICENSE Keywords: dbapi,postgresql @@ -23,7 +24,7 @@ Classifier: Topic :: Database :: Front-Ends Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires-Python: >=3.8 Requires-Dist: python-dateutil>=2.8.2 -Requires-Dist: scramp>=1.4.4 +Requires-Dist: scramp>=1.4.5 Description-Content-Type: text/markdown # pg8000 @@ -400,7 +401,26 @@ pg8000.exceptions.DatabaseError: ... ``` -instead you can write it using the [unnest +the most straightforward way to get around this problem is to rewrie the query using the [`ANY`]( +https://www.postgresql.org/docs/current/functions-comparisons.html#FUNCTIONS-COMPARISONS-ANY-SOME) +function: + +```python +>>> import pg8000.native +>>> +>>> con = pg8000.native.Connection("postgres", password="cpsnow") +>>> +>>> con.run("SELECT 'silo 1' WHERE 'a' = ANY(:v)", v=['a', 'b']) +[['silo 1']] +>>> con.close() + +``` + +However, using the array variant of `ANY` [may cause a performance problem]( +https://stackoverflow.com/questions/34627026/in-vs-any-operator-in-postgresql/34627688#34627688) +and so you can use the [subquery variant of `IN`]( +https://www.postgresql.org/docs/current/functions-subquery.html#FUNCTIONS-SUBQUERY-IN) +with the [unnest ](https://www.postgresql.org/docs/current/functions-array.html) function: ```python @@ -2068,6 +2088,12 @@ twine upload dist/* ## Release Notes +### Version 1.31.2, 2024-04-28 + +- Fix bug where `parameter_statuses` fails for non-ascii encoding. +- Add support for Python 3.12 + + ### Version 1.31.1, 2024-04-01 - Move to src style layout, and also for packaging use Hatch rather than setuptools. This means that if the source distribution has a directory added to it (as is needed for packaging for OS distributions) the package can still be built. |