public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: senor <[email protected]>
Cc: pgsql-general@lists <[email protected]>
Subject: Re: sequence on daily log partitioned table
Date: Mon, 21 Apr 2025 22:02:21 -0700
Message-ID: <CAKFQuwbHvjjrYSKV2JioP-R0HmTtsztMYv_fCV9odyHvMhTqow@mail.gmail.com> (raw)
In-Reply-To: <LV8P220MB09555DBF54A6F74131D92D88F7BB2@LV8P220MB0955.NAMP220.PROD.OUTLOOK.COM>
References: <LV8P220MB09555DBF54A6F74131D92D88F7BB2@LV8P220MB0955.NAMP220.PROD.OUTLOOK.COM>

On Monday, April 21, 2025, senor <[email protected]> wrote:
>
> I'm mainly interested in understanding how this works or why it can't
>

Partition routing happens on fully-formed tuples.  They thus must be formed
initially using only context, like defaults, attached to the partitioned
table.

You can do what you want if you directly insert into the individual
partitions, using the partitioned table as a read-only interface.

It looks like this:

https://dbfiddle.uk/Xc3cUHSO

David J.


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: sequence on daily log partitioned table
  In-Reply-To: <CAKFQuwbHvjjrYSKV2JioP-R0HmTtsztMYv_fCV9odyHvMhTqow@mail.gmail.com>

* 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