older version of Postgres cannot convert jsonb to int

This commit is contained in:
Sarah Hoffmann 2023-07-26 17:45:21 +02:00
parent 77ed4f98bb
commit 8cba65809c

View File

@ -188,7 +188,7 @@ class ICUTokenizer(AbstractTokenizer):
in the database.
"""
with conn.cursor() as cur:
cur.execute("""SELECT word, sum((info->'count')::int) as count
cur.execute("""SELECT word, sum((info->>'count')::int) as count
FROM word WHERE type = 'W'
GROUP BY word
ORDER BY count DESC LIMIT %s""", (num,))