KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This psql session snippet should be self-explanatory: psql (9.1.7) Type "help" for help. => CREATE TABLE languages(language VARCHAR NOT NULL); CREATE TABLE => INSERT INTO languages VALUES ('english'),('french'),('turkish'); INSERT 0 3 => SELECT language, to_tsvector('english', 'hello world') FROM languages; language| to_tsvector ---------+--------------------- english | 'hello':1 'world':2 french | 'hello':1 'world':2 turkish | 'hello':1 'world':2 (3 rows) => SELECT language, to_tsvector(language, 'hello world') FROM languages; ERROR: function to_tsvector(character varying, unknown) does not exist LINE 1: select language, to_tsvector(language, 'hello world')... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. The problem is that Postgres function to_tsvector doesn't like varchar field type but this call should be perfectly correct according to the documentation ?
Tags (comma-separated)
Save Edits
Cancel