Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u75mA-00AGeC-Qf for pgsql-general@arkaria.postgresql.org; Tue, 22 Apr 2025 05:02:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u75m6-00BKQQ-TZ for pgsql-general@arkaria.postgresql.org; Tue, 22 Apr 2025 05:02:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u75m6-00BKQH-Bs for pgsql-general@lists.postgresql.org; Tue, 22 Apr 2025 05:02:27 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u75m3-001LaE-1N for pgsql-general@lists.postgresql.org; Tue, 22 Apr 2025 05:02:26 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-604ad6c4d3dso1272478eaf.0 for ; Mon, 21 Apr 2025 22:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745298142; x=1745902942; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+BX8lcalfq/vkIsvY6tToDhSwJgQqK48MTxakb5C23M=; b=IRkwWCmDQsxrTPSKCzKkXaS2RJkhfpdJbxP4/F565RZeXj1Fe3gwcuwYMMz0fHRjU7 8jm3KDtMk/08FbgY22VosGdpnzCf7OtErwBrOqIkDKlzLp+iwph8JfI/qspHwFSyAVBG BM3+WoJlql1wArDi805IYp00WP4sglWmyPZ7IPJgNq9++U0p160VEReHwO1avf2jHSPJ ZqzWJd3YViid5bAMm5BqK6Dp/yr8KsJpZxJetkqRgqJB565PuukgixUTLCT36q7CDDKI OJiLh9EP12hj9a2uIcahB63zSBnOysQef3R4ByqhB/bWH09Hy4uSL99sjZ24WXsribG4 /G+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745298142; x=1745902942; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+BX8lcalfq/vkIsvY6tToDhSwJgQqK48MTxakb5C23M=; b=bjHcGxD6Lb/eM353T1O4+5sMpzHVZwCze8eKCDOgVvdmD/eArWiGDYDIwOTuInthTY VgHNsLWqMx0jpWJImBc9bM27wGplcNaUikrQdqgTCkOJ7s7YGf796fWAMcpT3Q+7ZqZG mb1TSNQG9OYti+/L+p89KaMbsF37aoTI3jD1Qm2r+p4EQXYvGLhOGcDuNPptLsRDM091 vsVbMCX6vksSVIj9PdIXaH+BiRsrVCoDR3i5LZ7Bfr9Gr6mlAoDgYBuodze4xpLRa/XA 4cCfUWws9bQlPlcoThVy6AekVO/nQdcn73bY2yRW1PRdf9dkpxbpa2mUGHwYvxJo00vH 97ZQ== X-Gm-Message-State: AOJu0Yzf3CTHLwqWIi6af1sdeDCsMgVt+jURk+obevJVOUMtQxv0N5vE HZJ6meQB9CFJim4bVrARlYfDXT68WLJ8iquw6bvA4WvztV98fJwaSIMTysjZD9+65yjuX/eAcfK +iS2lE6T47z6C8nBXYtATUUPN6Xg= X-Gm-Gg: ASbGncuQbRzZRWkF/F6Ogkq8t6QzDAunej8VoTD0ABW5ndQcDh+JbcZaWM9kR7kMSJA kvRLGeE4OL45Qag0HtgGIMpgxu72JYSk0FT2vU0vTQdbmk2EuqXa5COdjjkk0hqyp6nGbKsIzMn JRDi+qrL4eJFwavIRsrXOl X-Google-Smtp-Source: AGHT+IGM++XL3Z9zhbhdblBcbqCsy8RejRw2+eWZjhSPMBrfyEC/C611GpbQJH47law9tJzMqNWXfzZw54SckB2di6c= X-Received: by 2002:a05:6871:53cd:b0:2c2:544d:e140 with SMTP id 586e51a60fabf-2d526a36520mr7773634fac.11.1745298142111; Mon, 21 Apr 2025 22:02:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:1051:0:b0:589:13f9:e937 with HTTP; Mon, 21 Apr 2025 22:02:21 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Mon, 21 Apr 2025 22:02:21 -0700 X-Gm-Features: ATxdqUEms2x7fAuQPPKPKC9PmamxBJ32UMQudg9HQm_kCF7AQBth9QIoexnV-mE Message-ID: Subject: Re: sequence on daily log partitioned table To: senor Cc: "pgsql-general@lists" Content-Type: multipart/alternative; boundary="000000000000c9afe8063356e3e0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c9afe8063356e3e0 Content-Type: text/plain; charset="UTF-8" On Monday, April 21, 2025, senor 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. --000000000000c9afe8063356e3e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, April 21, 2025, senor <frio_cervesa@hotmail.com> wrote:
I'm mainly interested in understanding how this works or why it can'= ;t

Partition routing happens on= fully-formed tuples.=C2=A0 They thus must be formed initially using only c= ontext, 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:

=
David J.

--000000000000c9afe8063356e3e0--