From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Louis Gonzales <louis(dot)gonzales(at)linuxlouis(dot)net> |
Cc: | Paul Newman <paul(dot)newman(at)tripoint(dot)co(dot)uk>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Triggers and Multiple Schemas. |
Date: | 2006-03-08 20:34:18 |
Message-ID: | 1141850058.6249.12.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 2006-03-08 at 14:32, Louis Gonzales wrote:
> Scott Marlowe wrote:
> > On Wed, 2006-03-08 at 14:19, Louis Gonzales wrote:
> >
> >
> > > Paul,
> > > When you say "multiple identical schemas" are they all separate
> > > explicit schemas? Or are they all under a general 'public' schema.
> > > From my understanding, when you create a new db instance, it's under
> > > the public level schema by default unless you create an explicit
> > > schema and subsequently a db instance - or several - therein,
> > > effectively establishing sibling db instances belonging to a single
> > > schema, I know at least that data in the form of table access is
> > > allowed across the siblings. I'd also assume that this would be the
> > > case for triggers and functions that could be identified or defined at
> > > the 'root' level
> > >
> > Ummm. In PostgreSQL schemas are contained within databases, not the
> > other way around. It's cluster contains databases contains schemas
> > contains objects (tables, sequences, indexes, et. al.)
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: explain analyze is your friend
> >
> I stand corrected. That's right. But under a database you create
> your explicit schemas, to organize tables which constitute your
> separate data, where all of the schemas belonging to a database
> instance, can share resources without conflicting with one another.
>
> I apologize for giving the inaccurate description of database to
> schema relationship.
Heck, ya just got a couple terms crossed up. No biggie.
And yes, what the OP wanted to do should work. You just need to apply
the triggers to each schema's table individually.
I'd suggest scripting the whole thing in bash, perl, or php for easy
maintenance.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-03-08 20:41:46 | Re: Triggers and Multiple Schemas. |
Previous Message | Nik | 2006-03-08 20:32:44 | Re: Out of memory error on pg_restore |