[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing LedgerSMB into a schema?
- Subject: Re: Installing LedgerSMB into a schema?
- From: Tony Fraser <..hidden..>
- Date: Tue, 07 Nov 2006 19:27:43 -0800
On Mon, 2006-11-06 at 16:09 -0600, Charley Tiggs wrote:
> I should have been more explicit with regards to my question. I
> have a current application that has a set of tables. The tables for
> that application are installed in the public schema. I'm wanting to
> install the tables for LedgerSMB into a separate schema that would
> provide logical separation of the tables instead of creating a whole
> database. I'd like to do this for a number of reasons, the biggest
> being that I have to store the data for the products in a manner that
> LedgerSMB doesn't seem to allow at the moment. So, I create the
> in the clients existing app and then push that data to LSMB in a
> that LSMB will accept.
My though is very similar to Chris's but here it is:
CREATE SCHEMA ledgersmb;
CREATE USER lsmb_mycompany WITH NOCREATEDB NOCREATEUSER;
ALTER USER lsmb_mycompany SET search_path TO '$user, ledgersmb, public';
use admin.pl to create the dataset using your existing DB and the new
user lsmb_mycompany. PostgreSQL should place the LedgerSMB tables in the
ledgersmb schema because it is the first schema in the users search
In fact I bet Chris's idea would work without altering the Pg-*.sql
files because new unqualified tables are created in the first schema
listed in the search path.
Sybaspace Internet Solutions System Administrator
phone: (250) 246-5368 fax: (250) 246-5398