Aggregating data from stored procedures across multiple schemas

From: Rich Compton <rich(dot)compton(at)curvedental(dot)com>
To: pgsql-in-general(at)postgresql(dot)org
Subject: Aggregating data from stored procedures across multiple schemas
Date: 2016-06-01 22:40:13
Message-ID: CAKEobm-K0D4vvN5EsfgYSreuj982xv91=ND4-7kXHDZsW-1tqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-in-general

This is my first post so bear with me. I will most likely miss information.

Our current architecture is that each of our clients has their own
schemas. We have some clients considered enterprise clients that actually
own several offices (schemas). We are looking into aggregating data for
them for an enterprise portal of sorts. Each of our schemas have
procedures that tally all the production data we need. I am looking for a
way to aggregate all the data across multiple schemas using the stored
procedures.

My first vain attempt was with union all which works with views and tables
but not functions since they are not defined outside the schemas
themselves.

I know I can probably do it in code but would rather let our read slave DB
do the hard lifting.

Does anyone have ideas or thoughts on how this can be done?

Thanks in advance. Feel free to ask me more.

--

Rich Compton
Senior Software Developer - Curve Capture
Curvedental LTD

Responses

Browse pgsql-in-general by date

  From Date Subject
Next Message Ashutosh Bapat 2016-06-02 08:53:51 Re: Aggregating data from stored procedures across multiple schemas
Previous Message Elson Vaz 2016-05-22 21:43:42 Script to start postgres9.4 in RHCS 6