I'm trying to sort by converted column, but psql returns error:
SELECT * FROM table ORDER BY CONVERT(col1 USING utf8_to_iso_8859_2);
ERROR: syntax error at or near "USING" LINE 1: SELECT * FROM table ORDER BY CONVERT(col1 USING utf8... ^
*** Error ***
ERROR: syntax error at or near "USING" SQL state: 42601
I saw this function used liked this before and it's in documentation too, so I don't understand why I'm getting this error. Anything I missed?