Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

[requrest] PostgreSQL use schema besides 'public'

  • ellobo
  • ellobo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago - 3 years 5 months ago #117389 by ellobo
Hi!

I'm using a shared postgres database and the admin gave me a non-privileges user with:
Code:
search_path=limesurvey, public
 
This means all the tables created by my user end up in the 'limesurvey' schema.
 
I'm unable to install limesurvey in a specific schema. This is an important feature in postgresql because most of the time you're not given an entire database.
 
Thanks in advance,
Regards,
LL
Last edit: 3 years 5 months ago by c_schmitz.
The topic has been locked.
More
9 years 9 months ago #117394 by Wun
Hello,

new to this forum, I second that :-)

I have modified create-pgsql.sql and CPgsqlSchema.php to make it work,
but it seems not to be so simple.

Did somebody get this scenario to work ?

Regards Wun

ellobo wrote: Hi!

I'm using a shared postgres database and the admin gave me a non-privileges user with:

Code:
search_path=limesurvey, public

This means all the tables created by my user end up in the 'limesurvey' schema.

I'm unable to install limesurvey in a specific schema. This is an important feature in postgresql because most of the time you're not given an entire database.

Thanks in advance,
Regards,
LL

The topic has been locked.
More
6 years 10 months ago #162281 by matarancon
Replied by matarancon on topic [requrest] PostgreSQL use schema besides 'public'
I have the same problem.
Where is the search_path????
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
6 years 9 months ago #164469 by DenisChenu
Replied by DenisChenu on topic [requrest] PostgreSQL use schema besides 'public'
Dis someone put this on Bug report or feature request ?

Forum are not the place for this, to start discussion or know if there are a solution, yes. But not for asking the feature …

www.limesurvey.org/community/feature-requests

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • c_schmitz
  • c_schmitz's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
3 years 5 months ago #217542 by c_schmitz
Here is somewhat of a workaround:

This will work for existing instances, which you moved from 'public' to a new schema.
This does not work for new instances, yet.


To set a custom schema you need to modify the search path by SQL right after establishing connection.


This is possible by adding a initSQL clause to config.php in the DB credentials sections.

( See \application\config\config-sample-sqlsrv.php for an example) .

The related query could be like

"SET search_path TO <name_of_your_accountschema>;"

Best regards

Carsten Schmitz
LimeSurvey project leader
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #222646 by holch
Just posting here to get rid of the (already deleted) spam message that still shows up in the forum overview. We need to fix the forum software. In the forums with less traffic, those messages show for ever in the preview of the overview page. Not a good image for the forum.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose