SV: Tools showing table partitions as tables in listings of tables

From: Niels Jespersen <NJN(at)dst(dot)dk>
To: "depesz(at)depesz(dot)com" <depesz(at)depesz(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: SV: Tools showing table partitions as tables in listings of tables
Date: 2020-12-09 15:33:03
Message-ID: 3979872f0a08409c96bbe7e8a3f68605@dst.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> A small irritation point is that some tools decide that partitions
>> under a table are to be shown in a list of tables, sometimes drowning the main table in a sea of partitions.
>
>While this doesn't answer your question directly, but when I had this problem, I simply moved partitions to separate schema.
>So, let's say I have table plans in schema public. All its partitions are in "plans" schema.
>Of course naming can be done differently, but the thing is that you can do it, and it doesn't cause any issues with queries - as long as you use main table and not directly partitions.
>
>Best regards,
>
>depesz
>
I had not thought of that. Nice trick. I think we have a standard security setup that revolves around schemas, that may suffer more than this helps. I will think about that some more.

Thank you for the tip.

Regards Niels

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2020-12-09 15:39:06 Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?
Previous Message Tom Lane 2020-12-09 15:18:06 Re: Execution order of CTEs / set_config and current_setting in the same query