Using different schema other than public in Postgres
-
Hi Victor,
How can set the configuration to use different schema in the database. Currently, all the tables are created in the public schema. Since it creates lot of tables with idata and tdata, the public schema gets cluttered. I am using Postgres.
Please let me know how can I achieve this ?
Thanks and best regards,
ravi
-
Currently NetXMS does not support this. In Postgres terms the thing you need is called search path - it defines in which schemas Postgres will search for a database with a give name.
One (complicated) way could be to add -csearch_path option to the connection function in /src/db/dbdrv/pgsql/pgsql.cppBut it looks like it's possible to specify default search path in Postgres for each user - some information could be found here: https://stackoverflow.com/a/49930672
-
Hi Filipp,
Great !! The problem is solved. I created a user in Postgres with ownership to the required schema. I configured this user in system DNS as well as in server configuration of netXMS while installing. It created all the tables in the specified schema instead of public schema. The problem is solved.
Thanks you so much.
Best regards,
Ravi
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login