Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

What does the Postgres operator do?

$
0
0

I was reading through the Postgres documentation on materialized views and in one example they use the following:

SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10;

I tried to run a similar query on my own database, but I get an error.

[42883] ERROR: operator does not exist: character varying <-> unknown

I (probably) don’t need to use the operator, but I’m just curious what it does.

Notes:

  • I am running the same version as the docs (9.3)
  • I did try Googling the question, but Google just ignores the <-> even if you wrap it in quotes.

Viewing all articles
Browse latest Browse all 1138

Latest Images

Trending Articles



Latest Images