-
Notifications
You must be signed in to change notification settings - Fork 44
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
ProgrammingError: (psycopg.errors.UndefinedFunction) function parse_websearch #154
Comments
Solution at https://stackoverflow.com/a/78402972 |
The issue it that engine.create_all is patched by this library to register additional functions. Also, autogenerated alembic migrations no not nearly detect all relevant changes, thus a complete example below.
in alembic:
Note that you can remove |
When I try to execute a search query, I get the following error:
I checked the functions defined in the database:
It seems like the first argument type (regconfig) is wrong, and the query fails.
I managed to execute the query manually, removing the cast to VARCHAR:
to
Am I missing something in SQLAlchemy set up? I defined the base class
Base
, and then run:make_searchable(Base.metadata)
. After describing all SQLAlchemy models, I run:configure_mappers()
.In addition, because I use alembic, and I added these command to the migration:
op.execute(sql_expressions)
andsync_trigger
I use:
PostgreSQL 16.0
psycopg 3.1.18
sqlalchemy 2.0.29
sqlalchemy-searchable 2.1.0
The text was updated successfully, but these errors were encountered: