From: | Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz> |
---|---|
To: | PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Plans for partitioning of inheriting tables |
Date: | 2024-10-25 18:45:19 |
Message-ID: | ea963edb-5437-4de6-bd2c-97c141a391b8@gelassene-pferde.biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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/tables/TOPO_FILES.pg_sqlcreate
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.
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()
);
From | Date | Subject | |
---|---|---|---|
Next Message | Thiemo Kellner | 2024-10-25 18:47:11 | Plans for partitioning of inheriting tables |
Previous Message | Adrian Klaver | 2024-10-25 15:57:31 | Re: Plans for partitioning of inheriting tables |