R: aggregate over tables in different schema

From: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: R: aggregate over tables in different schema
Date: 2010-01-10 09:49:48
Message-ID: 3eff28921001100149h31fbb39fp316a24fc683f406d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try using inheritance.

Il giorno 10 gen, 2010 2:30 m., "Ivan Sergio Borgonovo" <
mail(at)webthatworks(dot)it> ha scritto:

I've tables in different schemas all with the same name and
structure.
I'd like to compute an aggregate on the union of those tables.
I don't know the schemas in advance.
The list of the schema will be built selecting all the schemas that
contain a table with that name.

Other than building dynamically the statement as a list of union or
building up a view is there any other way?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-01-10 12:25:36 Re: postgres
Previous Message Craig Ringer 2010-01-10 08:01:57 Re: Optimistic locking with multiple rows