Using PostgreSQL schemas in Tryton

(Victor) #1

Is it possible to use PostgreSQL schemes in Tryton?

(Cédric Krier) #2

I guess you are talking about schemas.
And yes, Tryton supports them. But they must be defined in the search_path of the PG user and they are not explicitly used in the Model definition. Tryton will uses the first table found in the search_path.

I wrote some times ago a post that explain how to use this feature to share some tables between two databases.

(Victor) #3


  1. Is it possible for a user to choose a schema at the moment of connecting to database?
  2. Is it possible for different users to work with different schemas at the same time?

(Cédric Krier) #4

What users are you talking about? Tryton has only one database user.

(Victor) #5

I’m talking about Tryton Client users.

(Cédric Krier) #6

The user already choose the database so you can set a search_path per database.

(Victor) #7

Can the user dynamically set the search_path in Tryton Client?

(Cédric Krier) #8

No, this will be major breakage.