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 1x4ofs-007Qx4-05 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 23:59:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4ofp-00AImW-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 23:59:21 +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 1x4ofo-00AIm8-2o for pgsql-hackers@lists.postgresql.org; Thu, 10 Sep 2026 23:59:21 +0000 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x4ofl-000000052fc-2M7l for pgsql-hackers@postgresql.org; Thu, 10 Sep 2026 23:59:19 +0000 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-90cd8e45460so3841976d6.1 for ; Thu, 10 Sep 2026 16:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20251104.gappssmtp.com; s=20251104; t=1789084755; x=1789689555; darn=postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=rOn5QzOBG0RuYvk4OtR4ovX4IchCPFR6PJFd/g6VBh4=; b=LNoK5ePyfmHMreOmEk9esnB+qKivT5/wGbfp2bYMc2+1BLU6ADv+nC87i7svvnE3PI UNhBCORiLBK+WVcbhKxz0G7aivW1PPK9wX+VXpdHXk3Ot7qWXg+qPhEdYFndJr33+4GX P2y0DytgLJg+EJ0WLZ7wsGaAIYtZ1DpxOA8R7lR+wuYXlOayabfbbGD/SGB/tGTYJb32 61DRm+tbCiZm/cM+ykoaIatVNl6e9HVd2+/kBMQVcZ3D76HXtonTERhORmozgrSBse1k 3S7XBFUYJiLF/RTFyQlxC/fvlG9QJGjdCUiPTEk0KGGePdSAdxGfDspIl7yntpVoLuVs pKjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789084755; x=1789689555; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rOn5QzOBG0RuYvk4OtR4ovX4IchCPFR6PJFd/g6VBh4=; b=brbJXU7QijJnIdsZ+24SOXWYv3QjHNFZE5wMr4ExrvV9PasfeqiejNGuc1jFFXu8bj 1SZI+v2P0TngrhP1kZ2fcSHB9pV2/Llz+cAIJhFweWdgWJbe59kMPXof3X8BeWMHQGK2 wULC/Ki5xBX+lSflzdrLwsRutKYJ1xGdLp1IH8Du7ReIhl3Kuy5a56LnEpvlvbCumENy W+oZDUeTwpxbp1jV53YvcIEoeKPGC+rBLwCNuXO7UAZ7p71pu15vTwQpqTEK0m8WGPmP lNp/gGk5RCP4BcPMIDB3+u1Mg83rsvXIeXnqdgaD6joPn/NnxsFM4Flxz401+t/+rmbI 9gAA== X-Forwarded-Encrypted: i=1; AKwUvBx36PeDESQ3nGQR/eAjmglSzeIKFVo3CFQxeZdq9EShKIoWEW/+UnEJpnHe7VVH0HcL9jqShhXAeNFcq7Po@postgresql.org X-Gm-Message-State: AFuF++ma3CqfTRs0QWwRNZI1lYm9GoDsdpQ7kD6lxxF5JZ7YY5YzoX4S gj9LMxdx2VHxa3P/pygai1bGt9CMo5AQ9oCAeKAQi8OGbIDpQO+zHKes9s+Z/N7R6yE= X-Gm-Gg: AYBFou0Zrnnu3GAVqlw7iuKpXtn21/sBRJxBpFiLdbQyLZERZMHWevWC1io8kZ01XHB dnenjNaaeQc7a5BLJIMuvEauH2+1mURjshY6IwVT/TwS+tQSDahBY/3Q5+3wfREkoM7QTDKJHgz Pia+Sjc21zvoqxbMIJt8i1KHuZWTiQddqYPlKHzFKlX0DPMaS9Uv93s5t1ly/jgOj2ecuPj9zmC X5vVklOsbhM4yt2f4QEXHbud2IO+Nuo/wfJUcORQGVDtvuva+T1yp3A7ZCSEL80K/Hn2wcvQyRl AwA6vcYXZ5lAzEsAjwToZucu8dNih+hCXR64/fzMn5LufcXC+27yxo83oEwaR+3e6qkOI7E8a91 9yEUbHBNESMKPN+4ThU2XBa8VfBhHR91GoHloFnSXMrV0WmQWmThldzUcxo+J15rWXOY9w9Qqr1 NA3kNF4TRBI1XLBWFb89gbv72jG3Gckh6aW0YfasEO/DJM3Jb9PJJgTf3zvCwysCPppd4mjhwex OZdAVLjzg== X-Received: by 2002:a05:620a:29c4:b0:939:a1cc:f234 with SMTP id af79cd13be357-939e9d9bb34mr213429785a.5.1789084750804; Thu, 10 Sep 2026 16:59:10 -0700 (PDT) Received: from ?IPV6:2605:a601:a6a6:4300::303? ([2605:a601:a6a6:4300::303]) by smtp.gmail.com with ESMTPSA id af79cd13be357-939e8080404sm105505085a.28.2026.09.10.16.59.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Sep 2026 16:59:10 -0700 (PDT) Message-ID: <15fec0f0-a076-499a-8349-e1b2aac0f4f2@dunslane.net> Date: Thu, 10 Sep 2026 19:59:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_get_*_ddl() needs a redesign From: Andrew Dunstan To: Andres Freund Cc: Tom Lane , Noah Misch , Melanie Plageman , gonzalemario@gmail.com, dbryan.green@gmail.com, euler@eulerto.com, pgsql-hackers@postgresql.org References: <20260827015242.54.noahmisch@microsoft.com> <20260909172132.0a.noahmisch@microsoft.com> <640139.1788975299@sss.pgh.pa.us> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-09-09 We 6:25 PM, Andrew Dunstan wrote: > > > Thanks for reviewing. I hope to have some proposals tomorrow for > addressing these issues as well as those raised by Noah. > > > I have run out of time, energy and brain cells. I have some working patches, but a) they need a little polish and b) I think they are too invasive for consideration now. The major difference in actual code (as opposed to testing) is in how we deal with permissions. I spent quite a lot of time yesterday and today on that, and came to the conclusion that it needs to be reworked along these lines: we should allow the user to see the information the functions provide if and only if they can see it by directly selecting from the catalog. Code changes to implement this by directly running ACL checks onĀ  the relevant catalogs are straightforward but also substantial. My proposed changes to testing are also substantial, being both more efficient and providing better coverage, especially w.r.t pg_dump/all compatibility. I therefore suggest that we revert for release 19, but not in master, and I will continue to polish the patches I mentioned and publish them in a few days. I can make the revert happen in the next day or so. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com