Difference between revisions of "Freeside:1.9:Documentation:Administration:PostgreSQL Schema"
(New page: = Introduction = The instructions pertain specifically to using a non-standard PostgreSQL "schema" name - a sub-partition within a database (see [http://www.postgresql.org/docs/current/st...) |
(No difference)
|
Latest revision as of 13:18, 26 July 2009
Introduction
The instructions pertain specifically to using a non-standard PostgreSQL "schema" name - a sub-partition within a database (see Schemas in the PostgreSQL documentation). They do not refer to using custom tables or columns (i.e. not the Database schema in the traditional/generic sense).
Normally PostgreSQL defaults to the "public" schema. In some environments this may be deemed undesirable, even though there is no actual logical reason for this. There is nothing special about the "public" schema as opposed to any other name (PostgreSQL stores system objects in the "pg_catalog" schema).
Setting the schema name in Freeside
Edit the /usr/local/etc/freeside/secrets
file (or in installations installed from RPM or Debian packages, the /etc/freeside/secrets
file). Add a fourth line with the schema name. Make sure that the schema name appears on the fourth line, even if you are not using a database password and the third line is blank.
Setting the search path in PostgreSQL
The hack described above only sets the schema for the cases when Freeside uses the schema name explicitly. You are responsible yourself for ensuring that your non-standard schema appears before any other existing schema in the schema search path. The usual way to do this is:
ALTER USER freeside SET search_path TO custom_schema_name;