error: column "undefined" does not exist postgres to_tsquery

Hi im getting a unidentifiable error from postgres. Would anyone be able to lead me towards to right solution?

'SELECT * FROM photo'+ 
        ' JOIN collection ON (photo.collection_id = collection.id)'+
        ' JOIN photographer ON (photo.photographer_id = photographer.id)'+
        ` WHERE collection.title = ${category} AND to_tsvector(photo.decription||' '||photographer.name ||' '||photographer.location||' '||photographer.bio||' '||photographer.name||' '|| photographer.twitter_username||' '||photographer.instagram_username) @@ to_tsquery(${text})`,

the error reads

error: column "undefined" does not exist

133 thoughts on “error: column "undefined" does not exist postgres to_tsquery”

Leave a Comment