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 1w9qV8-001oXa-1E for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 20:24:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9qV6-00BvR3-2o for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 20:24:49 +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.96) (envelope-from ) id 1w9qV6-00BvQu-1X for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 20:24:48 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w9qV4-00000000xb1-2AVE for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 20:24:48 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5a3d42263e4so1984221e87.2 for ; Mon, 06 Apr 2026 13:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775507085; cv=none; d=google.com; s=arc-20240605; b=H2j4QYQz+KMx5utoyYGoh4DAhlI2VYatwnpukT8noJeLepa0i+bVn1YlHftxq+bSx6 eqP1zLpSrpD80yKotaJeEdFKWRDH0TC2vNrF73GHSqUDf3QfPIKtzQHjNsfzVMc4ic5r B6BNxHFlCOB2M5ULtlqPqFR3Fe2Q5M3W9QM7GHvFdGMk+AUZWmqsoARAvNcoFMYCqn5y zpGZMoo5OVIZ1H0PmCrbaLPDPWH0wN/pUpw0XxbhHZ25vajMXOWqH0D4eS4JZdcgVTS2 Kf46k/0Eto1lhA7AYfXdHigPQMbMo5POMerDLxplGPKs7FuczLxmX2rqNXcSq/0ACXhS g+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=FoaQYeqUDXUvvkYEFJdMwbE6+/yL/kFfwgc1MyvH7PY=; fh=lfDSvittlgbu3TlPv12qAnShvZYq/JI47yfMifdHYA8=; b=TT4vZp3lYw1LcN44L+fTfZJO7sokRRR0DnVRhiIFHYVJ8uKmtamwxCBqk2CetacDnr 7J/KYs8Z/OAVUub8uvBAEq/NE1wgkV/qxBJ7RqZe7XeVfN/eKQf1ZkxkFRgUfm+ZJy8r j5dqzxgQudGTytQArN4oXT69ihlW7MbPt0O9abH8aJiAvYupj7u3Mn4drG3G9vzFexzd vnX4bz19rWBgfBJn8bvTr++Hh9+dJzULJHy9zppkXHrChSKS7Ij3HsNmj0aLoOeUlP+l sbHFFANjRL1PoL14ZRtf1UblQYTFZr3T/GxxRD/A3uWVXtxKRjrlQ0icW6M9B5dvg6Rh F82g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1775507085; x=1776111885; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FoaQYeqUDXUvvkYEFJdMwbE6+/yL/kFfwgc1MyvH7PY=; b=hJ9dVYlPVb3FPv6Yo8bcsNiX1Qg6o4daPYdE/ZksIT4TqEqk/P7IKC10DIVXaHnvL3 Hn6/hwMzBb2FSx8UvlAd0ojg24XSdBLD0rxiMTzmcd6XLreOUm2UlBx8Qv8tH9hKSYbt P2RUCAjZjfTZHvGvqmmYh+Zs6febi95OTh8JDOwDRyVaV7Jx3DzSZPD/kLJ1XoWEGxBc N7+5g89R0YrISjjbsBAYLjn/WayG5d7p4DrKEs6zN5EvWlknP67ETEWsaemXl+tu6cKI U2yJC3wNLu1LBoOognKYIsONRtFirT2iyI9VpELLrWHlKTZOYck/dHDC59KTuyxWH2l1 ZXvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775507085; x=1776111885; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FoaQYeqUDXUvvkYEFJdMwbE6+/yL/kFfwgc1MyvH7PY=; b=SCKW0aGAUvxzk7IA9WCn4dVf3RoNqsZ5OliO17+KgKqYhiKBGYWeBTsCVFVHYwvz5V 4VeN1Qp5Di0D0LuQ400OzJjq9YvxUiCWAsebGSMN4GGBng3hfbmZCfH80e+KQtRzrGTQ mFdwDD7PRev3rR9kM0NcS/HYoKx3ht4Ui3LOXU6Zrms1Q4p6z+uFRWt1Yh3x/WdPTdHp VHr90wtJUyZk8SjvAq2EjdS8im+m4tKYo6Me25MvpiTX5Pspr53GuKwpHtWZkh/MUiZx 8iYpkhYv8gYxsW2uhbfoJgC7dH+TbI8ObpP8dMBlvCVa96Y8mv4RGNfPkEwdbcY+lDVw xkkg== X-Forwarded-Encrypted: i=1; AJvYcCUdPQBj9KjkV+iVw5xRRqALimeQtz5BaF41dpFj1X4ssAjBGz+Ma2nCej8dt3BGwPdYMQsFTJgdvehiJ1YU@lists.postgresql.org X-Gm-Message-State: AOJu0Yy71zvTD2wmIw2N6k3aTNCEfhnJ9LED+P59IipYSrECeMJrGH+b OYViV3S/ImAxCUyEL6g0wvJo3Zm7US1SyYnCKblHBaz3AcSac463SfagRAW4KflNfAh0JC3V8Mp 3oU1APX5pHznEg+3X/QU5UQ5zdcD1wG32T9LM7LGQOw== X-Gm-Gg: AeBDieufUoAj7xaxQseIGEqpGgiQhmR9B4rdCNDVzvfDO43HQQNBfeYCKAbAFVQm5HW wrXWvWov1NxZnlwTJHH1LiCwMVE1JoSlfVyop3Nv6K+cR4STGnF1kueK1hcfPok6hTpQyUK18Aj 0O6T6fMLY3qoxHHPro8sfn2/O2c/Eq7xGhx+QVxJLgxvHsyMDRpO50L7Ju5r8gAgDloEmqph9Q7 BNGBjfms52sLdU7MJegpp7aWQkhFTDNz1pefi8vANkld8kmQsnANBraHzXNANDLo9NJyoONTTE+ TMf2D+3L3WhIrUUOqf+sC5Se/YnxHNqpkPPZ X-Received: by 2002:a19:520e:0:b0:5a3:7528:6da1 with SMTP id 2adb3069b0e04-5a375286e2emr2689114e87.0.1775507084961; Mon, 06 Apr 2026 13:24:44 -0700 (PDT) MIME-Version: 1.0 References: <202603201311.yhtqmvektawm@alvherre.pgsql> <8ec9b67d-939e-4b22-8d56-a5129f92d32d@app.fastmail.com> <555cdee4-c024-4872-9d96-82ef4216239c@dunslane.net> <34dc4d59-fec8-43c2-aa7b-38917b3ce0aa@dunslane.net> <6ecd7573-850d-424a-9794-3ee1f73851c0@app.fastmail.com> In-Reply-To: <6ecd7573-850d-424a-9794-3ee1f73851c0@app.fastmail.com> From: Jelte Fennema-Nio Date: Mon, 6 Apr 2026 22:24:32 +0200 X-Gm-Features: AQROBzDlWGQNR0Q4W3WqttyQPwAfXtGzmtvJfDoIdByTgH6rZwsaQ7ngRhUi7rw Message-ID: Subject: Re: pg_get__*_ddl consolidation To: Euler Taveira Cc: Andrew Dunstan , "David G. Johnston" , japin , Zsolt Parragi , =?UTF-8?Q?=C3=81lvaro_Herrera?= , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 6 Apr 2026 at 19:10, Euler Taveira wrote: > although we already use this style > in some of the backend functions -- e.g. pg_logical_slot_*_changes()). Thanks for the additional context. I didn't know about pg_logical_slot_*_changes using this style. I searched the docs locally and cannot find any other functions that use this style. I think what makes pg_logical_slot_*_changes special, is that it passes these options to the plugin. The plugin can define any valid options, and postgres core cannot know what they are. I think this approach makes sense for those functions because of that, but the ddl functions don't pass the options to a plugin, so that argument does not apply here. > I also consider your approach but decided not to use it. The argument against > named arguments is that you cannot add new argument *without* a DEFAULT value; > if you do, all existing functions will fail. I'm not sure what kind of change you're referring to here. I don't understand how variadic options allow you to add a required argument to an existing function without breaking existing callers. Could you give a concrete example of a change that the VARIADIC allows, but the named arguments don't? > You also need to create another > function with a different list of arguments to support a new option. I don't understand this either. We often add new optional arguments to existing functions in a new major release. e.g. pg_start_backup got the exclusive argument in PG9.6. Or do you mean something else here?