How to enable/use postgres ltree extension in Citus server for application schema other than public schema?

Fahad Syed 0 Reputation points
2023-03-22T16:23:03.3633333+00:00

Hi,

My application database is deployed on Azure citus database which requires ltree extension for one of its schema. Currently the queries from my java application do not work since ltree extension is enabled/works for public schema only. While testing the query with psql clients, the queries only work if the search_path is set to both public schema and my application schema.

How should I resolve the situation where I can I use ltree extension without using public schema? Are there any Azure citus configuration that need to be made?

Best regards,
Fahad.

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2023-03-29T15:06:33.8433333+00:00

    @Fahad Syed Welcome to the Microsoft Q&A forum, Thanks for posting your question.

    Can you try to set the search_path to app_schema,public from the application side__?__

    Postgres would search an object (ex: ltree) first in the app_schema and if it doesn't find one searches the object in the public schema next. search_path can be changed by modifying the JDBC connection string or setting search_path connection parameters.

     Please let me know if that can work.

    Regards

    Geetha

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.