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.96) (envelope-from ) id 1vaQP7-008Dcj-1x for pgsql-general@arkaria.postgresql.org; Tue, 30 Dec 2025 03:28:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaQP5-002JCc-2n for pgsql-general@arkaria.postgresql.org; Tue, 30 Dec 2025 03:28:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaQP5-002JCT-1h for pgsql-general@lists.postgresql.org; Tue, 30 Dec 2025 03:28:12 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vaQP4-003HKk-3A for pgsql-general@lists.postgresql.org; Tue, 30 Dec 2025 03:28:11 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7cac8243bcdso6032896a34.3 for ; Mon, 29 Dec 2025 19:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767065290; x=1767670090; 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=U1zld/XdMkOFr+NgzgzGLJsI+ToV0rvr2lLFL6PqBys=; b=MFhJNUm2P4QAqCPqp8dMOfWPSqr8xFVEbwgZeBcIc/4OTRbIUYbsgUipN2KuJln2bi hJHmFeCE6N7uiktUf5tFOj5bGjSFWQdIX9DAsaVb2CmZr02PiZOfuvPADccCrXfSCmsf PorCkx7fbQuStHdO2xXrc2gVnviZrOUDT/87kvmr1TAvLHaz6VZZLcVq7xkmlfSLqqNz Z/g1Hkc+sCiWdCz+JlGjJZ6BUOjTm96quUc4jD3mKHBse9i5F2OJ64/1GzLMIX9SpUcg 1v4My7Icwz8+hNjsfFsqONRLNk0S65fu145qEWS8BoGbmMsBBF4Y5ncH8kvAy6OIVVgO XLTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767065290; x=1767670090; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=U1zld/XdMkOFr+NgzgzGLJsI+ToV0rvr2lLFL6PqBys=; b=NIkH3/8Xdq8C/jf7lSE/dODHXfjRU5Id4ZAgji/PVu6gnuZUZuX3jWvi5dsbRblvUp rS67lw6/ca+qDfLmecAnkDmkNPGG8BRkO0dL6iT1ocW3OLgLA7PAwE8q88ShseJOCAG6 e5yLNvWGDdyZcTjMaqSj+IpwH2mLYjRofNvRteKpSldjCJCeiqPnV8X/V8f2DVBWc02V YJ0BLPMfLHspSAAqek1thyjAdSzTVTRLd2ZnpglxNfj2PoGmGQhP10qBiNMFRtgHl3oU NEt2XfzwD3tUjFpgBKJdjC/3TmJWkxNnX+5y5qrTDOWTfW4c7TTf/4ScMO+NJh5pgCQM AQOQ== X-Gm-Message-State: AOJu0YzMH/qTh+UZD92BouwqdZ+KGUqgMC21Trhcq7Lbu3u++O8Sq5F6 lPdnp6IzgHwSIW3M/UPM9oeaPYuAEKikKEKvo3HSf7k+cVT9xAzy89A9fBcT2bYRjzBDxq/Nqbm nTiPVpWwQC5L318UQIoa85HEtaxVkMCo= X-Gm-Gg: AY/fxX5giyQ13QZCyJP3x6bboS1jT9CDjEOH2GVfdt5VSFVtXNfGoVWrVqa/ooqx/BD xJrfSKRmeHP8jeCtJOto/YioNjI8DHyORLJvO83lWIoRcTI/271YytadoyDnSRC7N2BMst9pbTy eaU65Ne05HR55b0VG/e6b8MWjb4rUloj5UUiLMSYOfaR9DjOrZVoPauGft3hw9z/FFtMs+cj/yH C7aUwl4zY6LnbNauwr3P6uy//Nv28CfaOfZkQ1YOvsDILE9kY601Sp2rhcd7isKqpkbaXgDbjlI XS8yHgQ= X-Google-Smtp-Source: AGHT+IE2Cqt11TvLCid0yTNmQ06B1xWSccz7gVN6YJrnrkyOMTmxlt2ckCUhey11yszGuulifmREGrH1wGRYLJRVapk= X-Received: by 2002:a4a:c887:0:b0:659:9a49:9070 with SMTP id 006d021491bc7-65d0eab8ddcmr11814877eaf.59.1767065289917; Mon, 29 Dec 2025 19:28:09 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:134b:b0:5f6:3e33:734e with HTTP; Mon, 29 Dec 2025 19:28:09 -0800 (PST) In-Reply-To: <403D51E9-3428-452B-A01C-2B090C1F637F@meddatainc.com> References: <8254F175-871C-4678-8D28-A67E09B099A6@meddatainc.com> <403D51E9-3428-452B-A01C-2B090C1F637F@meddatainc.com> From: "David G. Johnston" Date: Mon, 29 Dec 2025 20:28:09 -0700 X-Gm-Features: AQt7F2qfToMiyA2iDnoAQyNJuSj12ljq4t2rQWvBexjiYzv9R2s7JmE9gKC631k Message-ID: Subject: Combining metavariables and table names To: H Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000e6880c064722f2c5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e6880c064722f2c5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, December 29, 2025, H wrote: > > I used the exact syntax you provided, however, I suspect that format() > cannot be used in an argument in CREATE TRIGGER. > Oh, right. I was apparently overlooking the context and got tunnel vision around the =E2=80=9Cversioning=E2=80=9D function call that isn=E2=80=99t re= ally a call but rather a stored expression; and so the arguments must be simple literals (as documented). In that case you do indeed need to do the work in the client since the server needs the final result handed to it. You could also just create a wrapper function that calls versioning and has the two name part arguments as separate inputs. David J. --000000000000e6880c064722f2c5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, December 29, 2025, H <agents@meddatainc.com> wrote:

I used the exact syntax you provided, however, I suspect that format() cann= ot be used in an argument in CREATE TRIGGER.

Oh, right.=C2=A0 I was apparently overlook= ing the context and got tunnel vision around the =E2=80=9Cversioning=E2=80= =9D function call that isn=E2=80=99t really a call but rather a stored expr= ession; and so the arguments must be simple literals (as documented).
=

In that case you do indeed need to do the work in the c= lient since the server needs the final result handed to it.

<= /div>
You could also just create a wrapper function that calls versioni= ng and has the two name part arguments as separate inputs.

David J.

--000000000000e6880c064722f2c5--