Hello, I’m kinda new to both PostgreSQL and Corteza-Development, so feel free to correct me about any misconceptions. Up until now I’ve been more of a MSSQL Server-developer if that matters in any way.
So, to my problem: I’d like to test the potential of using Corteza in combination with an external database, specifically PostgreSQL. I’ve already created a dedicated user “corteza” that will be able to connect to my database to make any necessary changes, create tables etc… Right now, none of our data is stored within the default “public”-schema and I’d like to keep it that way to maintain some structure.
To avoid the pain that comes with using different databases in PostgreSQL I figured that I could simply create a new schema “corteza” where the Corteza-user has the ability to create new tables and access any necessary views on pre-existing data. The default search path should (to my understanding) ensure that the “corteza” user always uses the schema with the name “corteza” before resorting to “public” (which is the default otherwise).
So much for my theory and it actually works for new modules. If I tell Corteza to build a module that’s called, say “test”, it will create a new table with that name within the corteza-schema. That’s great. However, this does not seem to work when fetching that table again. Right after creating that new table Corteza raises an issue that says “Add schema for model test”. The user “corteza” seemingly does not access the table it has created itself, even though it has all permissions on the schema “corteza”.
Everything works completely fine when creating the table on the “public” schema, making me believe that the user tries to read on public explicitly, which ignores the usual search path. Is my assumption right? If so, what should I do to resolve this issue? I’d prefer not to dedicate the public-schema to Corteza if possible.
Thanks in advance.