#1 2025-08-05 10:02:38

keinn
Member
Registered: 2014-10-20
Posts: 120

can we operate multi Postgres schemas?

Can we operate on schemas other than the public schema in a Postgres database?

Because Postgres databases often have multiple schemas, all operations in our mORMot2 are performed on the public schema by default.

Usually, as a server program, we have superuser privileges and expect to be able to operate on all schemas.

Offline

#2 2025-08-06 05:59:55

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,148
Website

Re: can we operate multi Postgres schemas?

AFAIR in OrmProps.ExternalTableName you can custopmize the table name and add a schema to it, can't you?

Offline

#3 2025-08-06 07:13:54

zed
Member
Registered: 2015-02-26
Posts: 109

Re: can we operate multi Postgres schemas?

Offline

#4 2025-08-06 09:33:57

keinn
Member
Registered: 2014-10-20
Posts: 120

Re: can we operate multi Postgres schemas?

thanks, i will try it , still have a lot to learn in our mormot

Offline

#5 2025-08-09 11:27:49

keinn
Member
Registered: 2014-10-20
Posts: 120

Re: can we operate multi Postgres schemas?

ab wrote:

AFAIR in OrmProps.ExternalTableName you can custopmize the table name and add a schema to it, can't you?

I checked the entire mormot2 codebase and didn't find any directly definable ExternalTableName attribute anywhere.
Except for the OrmMapExternal, which can set the aExternalTableName parameter,
ForcedSchemaName does work, but it affects the entire link.

If Torm could set up a mapping for ExternalTableName during definition or initialization, it would be more flexible to use.

The way I learned to use Mormot was by conducting a global search for potential keywords, which was quite challenging.

Offline

#6 2025-08-10 08:46:33

flydev
Member
From: France
Registered: 2020-11-27
Posts: 111
Website

Re: can we operate multi Postgres schemas?

keinn wrote:

The way I learned to use Mormot was by conducting a global search for potential keywords, which was quite challenging.

I thought SAD 8.3[.6] (External database ORM internals) and api/mORMotDB.html might help clarifying.

Offline

Board footer

Powered by FluxBB