Access operator added by extension inside a schema I am writing an application that uses postgres. Each microservice uses its own schema inside the database.

So connect to the database schema I use this jdbc string:

jdbc:postgresql://${db.host}/${db.name}?currentSchema=${schema}


This kind of works, so each sql statement can use the tables inside the schema without the danger of accidentally accessing the other services schema.

But in one schema I'd like to use the earthdistance extension. I only managed to install it without setting a schema and when I connect to the DB without the currentSchema parameter I can access the &lt;@> operator to calculate the distance.
But with the parameter postgres complains that it's not able to find the operator.

Is there a way to access the operator that is in the public namespace, when I connected with the currentSchema parameter?

I'm kinda lost here :-(
You could schema qualify the operators when you invoke them. 

For example, instead of writing

SELECT current &lt;@&gt; destination


You can write:

SELECT current operator(public.&lt;@&gt;) destination


See Operator Invocations for more information