Re: query multiple schemas - Mailing list pgsql-general

From Dominique Devienne
Subject Re: query multiple schemas
Date
Msg-id CAFCRh--7Oh2CFdAhqN-GXbGt63djxHN2SYLHUwt_MKcYZZuTKg@mail.gmail.com
Whole thread Raw
In response to Re: query multiple schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sun, Apr 21, 2024 at 11:12 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Steve Baldwin <steve.baldwin@gmail.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

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: CLUSTER vs. VACUUM FULL
Next
From: Dominique Devienne
Date:
Subject: Re: query multiple schemas