Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Using different schema other than public in Postgres

Using different schema other than public in Postgres

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 39.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    R
    ravi2904
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      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.cpp

      But 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

      1 Reply Last reply
      0
      • R
        R
        ravi2904
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0

        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
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups