Skip to content

Contains query not working: Operator does not exist: text @> unknown #3199

Answered by laurenceisla
acupofjose asked this question in Q&A
Discussion options

You must be logged in to vote

The contains operator @> does not work for text types. It's used for arrays, json(b) and others. Are you trying to query all the users with username that belong to a list of candidates? If so you can use like(any):

http://localhost:3000/users?username=like(any).{dragarcia,acupofjose}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@acupofjose
Comment options

Answer selected by acupofjose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3198 on January 29, 2024 17:49.