Created
May 4, 2010 00:59
-
-
Save ultrasaurus/388812 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PGError: ERROR: function ts_rank_cd(text, tsquery) does not exist | |
LINE 1: SELECT phrases.*, ts_rank_cd(phrases.vectors,tsearch_query) ... |
wallboard_development=# \df ts_rank_cd
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+------------+------------------+------------------------------------+--------
pg_catalog | ts_rank_cd | real | real[], tsvector, tsquery | normal
pg_catalog | ts_rank_cd | real | real[], tsvector, tsquery, integer | normal
pg_catalog | ts_rank_cd | real | tsvector, tsquery | normal
pg_catalog | ts_rank_cd | real | tsvector, tsquery, integer | normal
(4 rows)
Look carefully at the signatures.
You're original error shows that 'phrases.vectors' is a 'text' object, not a tsvector object as expected.
Likely you'll need to do a to_tsvector()
wallboard_development=# \df to_tsvector
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+-------------+------------------+---------------------+--------
pg_catalog | to_tsvector | tsvector | regconfig, text | normal
pg_catalog | to_tsvector | tsvector | text | normal
(2 rows)
Essentially what I'm saying is change the query to:
SELECT phrases.*, ts_rank_cd(to_tsvector(phrases.vectors), tsearch_query) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SHOW search_path;
search_path
"$user",public
(1 row)