After installing PostgreSQL I keep getting an error.
"LINE 1: ...T COUNT() FROM (SELECT "blog_post"."id" AS Col1, SIMILARITY...*"
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
sudo apt install postgresql-contrib psql# CREATE EXTENSION pg_trgm; sudo service postgresql restart
(venv) dev-py@devpy-VirtualBox:~/Dev/mysite/mysite$ python manage.py runserver Watching for file changes with StatReloader Performing system checks...
System check identified no issues (0 silenced). July 12, 2019 - 20:31:19 Django version 2.2.3, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [12/Jul/2019 20:31:32] "GET /blog/search/ HTTP/1.1" 200 995 Internal Server Error: /blog/search/ Traceback (most recent call last): File "/home/dev-py/Dev/mysite/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedFunction: function similarity(character varying, unknown) does not exist
"LINE 1: ...T COUNT() FROM (SELECT "blog_post"."id" AS Col1, SIMILARITY...*"
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Any help would be appreciated. It took me 3 days of troubleshooting this before I asked for help but I am sure someone knows the answer and it's simple. If you need any more info please just lmk.