public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Thiemo Kellner <[email protected]>
To: PostgreSQL General <[email protected]>
Subject: Re: Plans for partitioning of inheriting tables
Date: Thu, 31 Oct 2024 09:57:06 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On 10/25/24 11:47, Thiemo Kellner wrote:
>
> Am 25.10.2024 um 17:57 schrieb Adrian Klaver:
>>
>>> I do not feel it applies to my case. I tried to create a partitioned
>>> table that inherits columns from a base table. The documentation you
>>> provided the URL seems to speak of realising partitioning by using
>>> inheritance.
>>
>> This needs a code example to go any further.
>
> Sorry, my bad. I posted the URL of the table that is inherited from. The
> recepient is
> https://sourceforge.net/p/treintaytres/code/HEAD/tree/trunk/code_files/data_storage/PostgreSQL/table... table if not exists TOPO_FILES (
>
> SOURCE_ID uuid
> constraint TOPO_FILES␟FK_01
> references SOURCES (ID)
> match full
> not null
> ,FILE_NAME text
> not null
> ,TILE raster
> not null
> ,FILE_CREATION_PIT timestamp(6) with time zone
> not null
> ,FILE_HASH text
> not null
> ,constraint TOPO_FILES␟PK primary key (ID)
> ,constraint TOPO_FILES␟UQ unique (SOURCE_ID
> ,FILE_NAME)
> )
> inherits(TEMPLATE_TECH);
> -- partition by hash (source_id); --NOTE Up to PG 17, partitioning with inheriting table is not possible.
It is just not the way you want to do it, see:
https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-USING-INHERITANCE
>
>
> The spender table ishttps://sourceforge.net/p/treintaytres/code/HEAD/tree/trunk/code_files/data_storage/PostgreSQL/tables/TEMPLATE_TECH.pg_sql
>
> create table if not exists TEMPLATE_TECH (
> ID uuid
> constraint TEMPLATE_TECH␟PK primary key
> not null
> default gen_random_uuid()
> ,ENTRY_PIT timestamp(6) with time zone
> not null
> default clock_timestamp()
> );
>
>
--
Adrian Klaver
[email protected]
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Plans for partitioning of inheriting tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox