ASKBOT / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
1.56k stars 627 forks source link

PostgreSQL 11 issue #874

Closed mzch closed 3 years ago

mzch commented 3 years ago

I use PostgreSQL 11 and 12 and I found a bit of issues in askbot/search/postgresql:

--- thread_and_post_models_03012016.plsql.orig  2020-09-24 22:09:37.646724008 +0900
+++ thread_and_post_models_03012016.plsql   2020-09-24 20:57:37.332673090 +0900
@@ -51,7 +51,7 @@
 DECLARE
     onerow record;
 BEGIN
-    FOR onerow IN SELECT * FROM pg_proc WHERE proname = 'concat_tsvectors' AND proisagg LOOP
+    FOR onerow IN SELECT * FROM pg_proc WHERE proname = 'concat_tsvectors' AND prokind = 'a' LOOP
         DROP AGGREGATE concat_tsvectors(tsvector);
     END LOOP;
     CREATE AGGREGATE concat_tsvectors (
--- thread_and_post_models_10032013.plsql.orig  2020-09-24 22:10:01.042910822 +0900
+++ thread_and_post_models_10032013.plsql   2020-09-24 20:57:48.068759178 +0900
@@ -51,7 +51,7 @@
 DECLARE
     onerow record;
 BEGIN
-    FOR onerow IN SELECT * FROM pg_proc WHERE proname = 'concat_tsvectors' AND proisagg LOOP
+    FOR onerow IN SELECT * FROM pg_proc WHERE proname = 'concat_tsvectors' AND prokind = 'a' LOOP
         DROP AGGREGATE concat_tsvectors(tsvector);
     END LOOP;
     CREATE AGGREGATE concat_tsvectors (

proisagg is deprecated and removed from PostgreSQL 11 or later.

evgenyfadeev commented 3 years ago

Versions published on Oct 10th of 2020 and later have this issue resolved. I recommend you try 0.11.0 - for Python 3 and 0.10.3 for Python 2.