-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with async or pooling using asyncpg #465
Comments
Image 11 is way down the release order and I doubt you will get much help debugging this from the community. Have you tried to at least use the latest image or better update the 11 image to the one that uses postgis3? |
I updated to the latest version (pulled it from docker hub) and I still have exactly the same problem |
This looks like some missing function. Can you please produce a sample dataset i.e something reproducible for use to test |
I have coded a synchronous version and an asynch version
It works fine. And then the async version: Execution:
But here it does not like %%. Get this error: |
I have another postgresql functions which is using asyncpg and they work fine. It is just the fuzzy search not working. |
What is the bug or the crash?
Getting error asyncpg.exceptions.UndefinedFunctionError: operator does not exist: text %% text HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
Steps to reproduce the issue
This is my code for initiating the connection:
conn_str = f'postgresql://{user}:{password}@{host}:{port}/{dbname}'
conn = await asyncpg.connect(conn_str)
and this is the code for using that connection:
async def fuzzy_search(conn, search_term, language):
try:
# Determine the column to search based on the language
column = 'name_en' if language == 'en' else 'name_se'
The database has been enabled for the pg_trgm extension
Versions
kartoza/postgis:11.0-2.5
Additional context
The database has been loaded with lots of geographical places and works fine with synchronous calls.
Have tried both with async and with pooling and both combined.
Have just had a 2-3 hours session with github chat trying to find a solution. But it gave up.
The text was updated successfully, but these errors were encountered: