Support for schema other than Public (postgres)

Questions and answers regarding general SQL and backend databases

Support for schema other than Public (postgres)

Postby r.fraikin » Fri Jun 11, 2021 9:26 am

Is there support within the Servoy Developer to work with postgres under a different schema than "Public"?

Say, i would make a table 'Articles' under:
- Public.Articles
- Alternate.Articles

I know you can make tables in another schema, and read then back within the Servoy's Developer.
(although, you have to distinct them by prefixing the table name, otherwise you couldn't tell)

However, when i start using the table from the non public schema, the foundsets and qbselects can't be used. (table unknown, so it seems..)

Regards,
Raymond
r.fraikin
 
Posts: 1
Joined: Fri Jun 11, 2021 8:51 am

Re: Support for schema other than Public (postgres)

Postby rgansevles » Fri Jun 11, 2021 1:02 pm

Raymond,

Servoy has a setting that you can put in the servoy.properties file for the server definition.


Code: Select all
server.n.prefixTables=true

Where n is replaced with the proper server nr.

If you modify that, Servoy will prefix tables more often, and you probably can access the table in the other schema.

Note that Developer may write that file, so you need to stop Developer first, edit the file and start Developer again.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1909
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: Support for schema other than Public (postgres)

Postby Joas » Tue Jul 06, 2021 11:18 am

Note that you can also enter the schema in de connection properties.

So if you work with different schemas, you can create a database connection for each schema.
Under the "Database Servers" node in the Solution explorer, you'll then have multiple connections to the same database, but using different schemas.
Joas de Haan
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 834
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 5 guests

cron