Re: query multiple schemas

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>, Norbert Sándor <sandor(dot)norbert(at)erinors(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: query multiple schemas
Date: 2024-04-23 07:33:09
Message-ID: CAFCRh--7Oh2CFdAhqN-GXbGt63djxHN2SYLHUwt_MKcYZZuTKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Apr 21, 2024 at 11:12 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com> writes:
> > If the number of tenant schemas is reasonably static, you could write a
> > plpgsql function to create a set of UNION ALL views
>
> Another idea is to build a partitioned table
>

Hi Norbert. I asked a [similar question][1] a while back,
and unfortunately didn't get any actionable input, perhaps
because I already mentioned in my message the options
proposed here so far. Seems like people like us, using a
dynamic number of schemas, are outliers in database-land.

In my case, the revision/version of the schema could be
different as well, which would complicate the partitioning idea.

In any case, I'm interested in what works well for you.
And if/when I get back to this issue myself, I'll do the same.

Thanks, --DD

[1]: https://postgrespro.com/list/thread-id/2673517

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Norbert Sándor 2024-04-23 09:08:26 Re: query multiple schemas
Previous Message Ron Johnson 2024-04-22 22:06:40 Re: CLUSTER vs. VACUUM FULL