I am trying to tokenize my table fields with a query.
SELECT regexp_split_to_table(mytable.field_name, E'\\s+') from mytable limit 20;
This works when I execute it from psql shell but when I do:
from django.db import connection cursor=connection.cursor()
cursor.execute("SELECT regexp_split_to_table(mytable.field_name,E'\\s+')
FROM mytable LIMIT 20")
cursor.fetchall()
... it fails to return tokens. What am I doing wrong?