While creating an index in Postgres I am getting an error:

invalid input syntax for type oid: "english"

LINE 1: ...s ON entity_attributes2 USING gist ( (to_tsvector('english',...

The query which I have used to create the index:

CREATE INDEX json_fts ON table USING gist ( (to_tsvector('english', abc->>'email_address')));

The abc column is of jsonb type and it contains the following data:

    "account": "10",
    "name": "Scott Theisman",
    "manageremail": "eric.larsen@xxx.com",
    "active": "t",
    "email_address": "scott.theisman@xxx.com",
    "employeeid": "74322509"
  • Does the 'english' text search configuration exist in your database? You can use the \dF command in psql. – jjanes Oct 18 '18 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.