Re: DBs and Schemas

From: Adam Ruth <aruth(at)intercation(dot)com>
To: "Roderick A(dot) Anderson" <raanders(at)acm(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: DBs and Schemas
Date: 2004-01-06 22:06:42
Message-ID: 9BEDB10A-4094-11D8-97E9-000A959D1424@intercation.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 1. Modifying the applications to use schemas instead of connecting to
> specific databases. Getting the authors to use schemas so I do it
> once.

One thing I'd suggest would be to modify the application to issue a
"set search_path = yourschema;" at the beginning, then the rest of the
application wouldn't need to change. That's what I did when I did
something similar.

Adam Ruth

On Jan 6, 2004, at 12:39 PM, Roderick A. Anderson wrote:

> I'm looking for some input on a configuration I'm implementing. The
> long
> term goal is to providing hosting for companies and organizations with
> a
> basic/generic set of applications that use PostgreSQL.
>
> Most of these applications want to be installed in their own database.
> Given I'm looking at 6 or so already this would be 6+ databases per
> company. Not my idea of an easy to admin situation.
>
> My plan is to make one database (per company/organization) and modify
> the
> installation scripts and the applications so they end up in and using
> different schemas (probably named the same as the database would have
> been
> named.)
>
> I currently see see several issues.
>
> 1. Modifying the applications to use schemas instead of connecting to
> specific databases. Getting the authors to use schemas so I do it
> once.
>
> 2. PostgreSQL usernames are global to the instance (?) not specific to
> the
> database which means each username has to/should include a grouping
> type of prefix/postfix identifier. I think this is so. Please
> tell me
> I'm wrong!
>
> 3. Isolation of users in a database from other users of another
> database.
> (Grants, groups, etc.) Just making sure I do it and not cutting
> them
> off from system stuff they need.
>
> And several more, I'm sure.
>
> Most of the reading I've done so far hasn't got into this very deep.
> (What
> did I miss in this arena?) I have done this type of setup before many
> years (10+) ago using Oracle but think there are significant
> differences
> in their way and the PostgreSQL way.
>
>
> TIA,
> Rod
> --
> "Open Source Software - You usually get more than you pay for..."
> "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-01-06 22:09:02 Re: Date column that defaults to 'now'
Previous Message Marc G. Fournier 2004-01-06 22:06:13 Re: Paypal WAS: PostgreSQL speakers needed for